Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/compat/ossaudio compat_ossaudio: Zero-initialize idat be...



details:   https://anonhg.NetBSD.org/src/rev/2b69d8269e31
branches:  trunk
changeset: 376490:2b69d8269e31
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Tue Jun 20 15:22:04 2023 +0000

description:
compat_ossaudio: Zero-initialize idat before copyout.

Unclear if there are any paths to the copyout without initialization,
but let's play it safe to keep the auditing effort low.

XXX pullup-8
XXX pullup-9
XXX pullup-10

diffstat:

 sys/compat/ossaudio/ossaudio.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r dc517618604d -r 2b69d8269e31 sys/compat/ossaudio/ossaudio.c
--- a/sys/compat/ossaudio/ossaudio.c    Tue Jun 20 15:21:55 2023 +0000
+++ b/sys/compat/ossaudio/ossaudio.c    Tue Jun 20 15:22:04 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ossaudio.c,v 1.84 2021/09/07 11:43:05 riastradh Exp $  */
+/*     $NetBSD: ossaudio.c,v 1.85 2023/06/20 15:22:04 riastradh Exp $  */
 
 /*-
  * Copyright (c) 1997, 2008 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ossaudio.c,v 1.84 2021/09/07 11:43:05 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ossaudio.c,v 1.85 2023/06/20 15:22:04 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/proc.h>
@@ -1069,7 +1069,7 @@ oss_ioctl_mixer(struct lwp *lwp, const s
        mixer_ctrl_t mc;
        struct oss_mixer_info omi;
        struct audio_device adev;
-       int idat;
+       int idat = 0;
        int i;
        int error;
        int l, r, n, e;



Home | Main Index | Thread Index | Old Index