summaryrefslogtreecommitdiff
path: root/sys/compat/ossaudio/ossaudio.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/compat/ossaudio/ossaudio.c')
-rw-r--r--sys/compat/ossaudio/ossaudio.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/compat/ossaudio/ossaudio.c b/sys/compat/ossaudio/ossaudio.c
index d4e7393a8d4..7ca547505f3 100644
--- a/sys/compat/ossaudio/ossaudio.c
+++ b/sys/compat/ossaudio/ossaudio.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ossaudio.c,v 1.74.4.4 2020/04/27 14:32:34 martin Exp $ */
+/* $NetBSD: ossaudio.c,v 1.74.4.5 2022/08/03 11:11:32 martin 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.74.4.4 2020/04/27 14:32:34 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ossaudio.c,v 1.74.4.5 2022/08/03 11:11:32 martin Exp $");
#include <sys/param.h>
#include <sys/proc.h>
@@ -664,6 +664,7 @@ oss_ioctl_audio(struct lwp *l, const struct oss_sys_ioctl_args *uap, register_t
goto out;
}
setblocksize(fp, &tmpinfo);
+ memset(&bufinfo, 0, sizeof(bufinfo));
bufinfo.fragsize = tmpinfo.blocksize;
bufinfo.fragments = tmpinfo.hiwat -
(tmpinfo.play.seek + tmpinfo.blocksize - 1) /
@@ -686,6 +687,7 @@ oss_ioctl_audio(struct lwp *l, const struct oss_sys_ioctl_args *uap, register_t
goto out;
}
setblocksize(fp, &tmpinfo);
+ memset(&bufinfo, 0, sizeof(bufinfo));
bufinfo.fragsize = tmpinfo.blocksize;
bufinfo.fragments = tmpinfo.record.seek / tmpinfo.blocksize;
bufinfo.fragstotal =
@@ -776,6 +778,7 @@ oss_ioctl_audio(struct lwp *l, const struct oss_sys_ioctl_args *uap, register_t
__func__, error));
goto out;
}
+ memset(&cntinfo, 0, sizeof(cntinfo));
cntinfo.bytes = tmpoffs.samples;
cntinfo.blocks = tmpoffs.deltablks;
cntinfo.ptr = tmpoffs.offset;
@@ -793,6 +796,7 @@ oss_ioctl_audio(struct lwp *l, const struct oss_sys_ioctl_args *uap, register_t
__func__, error));
goto out;
}
+ memset(&cntinfo, 0, sizeof(cntinfo));
cntinfo.bytes = tmpoffs.samples;
cntinfo.blocks = tmpoffs.deltablks;
cntinfo.ptr = tmpoffs.offset;