Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-9]: src/sys/compat/ossaudio Pull up following revision(s) (reques...
details: https://anonhg.NetBSD.org/src/rev/b9619f5331bd
branches: netbsd-9
changeset: 1001666:b9619f5331bd
user: martin <martin%NetBSD.org@localhost>
date: Wed Apr 22 18:12:26 2020 +0000
description:
Pull up following revision(s) (requested by maxv in ticket #841):
sys/compat/ossaudio/ossaudio.c: revision 1.83
ossaudio: Avoid giving userland uninitialized memory. Noticed by maxv.
The uninitalized field in this structure is `fillers`, an array that
simply reserves space for later changes in OSSv4, which this version
of the OSS compat layer (specifically for Linux applications) makes no
effort to implement.
diffstat:
sys/compat/ossaudio/ossaudio.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diffs (26 lines):
diff -r 8b422b334cec -r b9619f5331bd sys/compat/ossaudio/ossaudio.c
--- a/sys/compat/ossaudio/ossaudio.c Wed Apr 22 18:07:37 2020 +0000
+++ b/sys/compat/ossaudio/ossaudio.c Wed Apr 22 18:12:26 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ossaudio.c,v 1.74.4.2 2019/11/19 11:01:27 martin Exp $ */
+/* $NetBSD: ossaudio.c,v 1.74.4.3 2020/04/22 18:12:26 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.2 2019/11/19 11:01:27 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ossaudio.c,v 1.74.4.3 2020/04/22 18:12:26 martin Exp $");
#include <sys/param.h>
#include <sys/proc.h>
@@ -1084,6 +1084,7 @@
__func__, error));
goto out;
}
+ memset(&omi, 0, sizeof omi);
omi.modify_counter = 1;
strncpy(omi.id, adev.name, sizeof omi.id);
strncpy(omi.name, adev.name, sizeof omi.name);
Home |
Main Index |
Thread Index |
Old Index