Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/compat/svr4 Zero stack data before copyout.
details: https://anonhg.NetBSD.org/src/rev/1cf3fa651766
branches: trunk
changeset: 355414:1cf3fa651766
user: riastradh <riastradh%NetBSD.org@localhost>
date: Fri Jul 28 16:57:12 2017 +0000
description:
Zero stack data before copyout.
>From Ilja Van Sprundel.
diffstat:
sys/compat/svr4/svr4_lwp.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (27 lines):
diff -r e6fb3b894ba1 -r 1cf3fa651766 sys/compat/svr4/svr4_lwp.c
--- a/sys/compat/svr4/svr4_lwp.c Fri Jul 28 16:55:48 2017 +0000
+++ b/sys/compat/svr4/svr4_lwp.c Fri Jul 28 16:57:12 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: svr4_lwp.c,v 1.19 2009/11/23 00:46:07 rmind Exp $ */
+/* $NetBSD: svr4_lwp.c,v 1.20 2017/07/28 16:57:12 riastradh Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: svr4_lwp.c,v 1.19 2009/11/23 00:46:07 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: svr4_lwp.c,v 1.20 2017/07/28 16:57:12 riastradh Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -108,6 +108,8 @@
struct svr4_lwpinfo lwpinfo;
int error;
+ memset(&lwpinfo, 0, sizeof(lwpinfo));
+
/* XXX NJWLWP */
TIMEVAL_TO_TIMESPEC(&l->l_proc->p_stats->p_ru.ru_stime, &lwpinfo.lwp_stime);
TIMEVAL_TO_TIMESPEC(&l->l_proc->p_stats->p_ru.ru_utime, &lwpinfo.lwp_utime);
Home |
Main Index |
Thread Index |
Old Index