Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/compat/sunos32 compat_sunos32: Memset zero before copyout.
details: https://anonhg.NetBSD.org/src/rev/dc517618604d
branches: trunk
changeset: 376489:dc517618604d
user: riastradh <riastradh%NetBSD.org@localhost>
date: Tue Jun 20 15:21:55 2023 +0000
description:
compat_sunos32: Memset zero before copyout.
Unclear if this can leak anything but let's be on the safe side.
XXX pullup-8
XXX pullup-9
XXX pullup-10
diffstat:
sys/compat/sunos32/sunos32_misc.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diffs (26 lines):
diff -r b3ff495edb91 -r dc517618604d sys/compat/sunos32/sunos32_misc.c
--- a/sys/compat/sunos32/sunos32_misc.c Tue Jun 20 11:00:29 2023 +0000
+++ b/sys/compat/sunos32/sunos32_misc.c Tue Jun 20 15:21:55 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sunos32_misc.c,v 1.85 2021/09/07 11:43:05 riastradh Exp $ */
+/* $NetBSD: sunos32_misc.c,v 1.86 2023/06/20 15:21:55 riastradh Exp $ */
/* from :NetBSD: sunos_misc.c,v 1.107 2000/12/01 19:25:10 jdolecek Exp */
/*
@@ -77,7 +77,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sunos32_misc.c,v 1.85 2021/09/07 11:43:05 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunos32_misc.c,v 1.86 2023/06/20 15:21:55 riastradh Exp $");
#define COMPAT_SUNOS 1
@@ -242,6 +242,7 @@ static inline void sunos32_from___stat13
static inline void
sunos32_from___stat13(struct stat *sbp, struct netbsd32_stat43 *sb32p)
{
+ memset(sb32p, 0, sizeof(*sb32p));
sb32p->st_dev = sbp->st_dev;
sb32p->st_ino = sbp->st_ino;
sb32p->st_mode = sbp->st_mode;
Home |
Main Index |
Thread Index |
Old Index