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
This commit is contained in:
riastradh 2023-06-20 15:22:04 +00:00
parent bba2b2a5ee
commit 46aa4c99e5
1 changed files with 3 additions and 3 deletions

View File

@ -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 struct oss_sys_ioctl_args *uap, register_
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;