Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/sysmon Fix info leak, not all of 'pev' is initialized.
details: https://anonhg.NetBSD.org/src/rev/ff58721f8ff1
branches: trunk
changeset: 964878:ff58721f8ff1
user: maxv <maxv%NetBSD.org@localhost>
date: Tue Aug 20 18:43:57 2019 +0000
description:
Fix info leak, not all of 'pev' is initialized.
diffstat:
sys/dev/sysmon/sysmon_power.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (27 lines):
diff -r 60bec2116e1e -r ff58721f8ff1 sys/dev/sysmon/sysmon_power.c
--- a/sys/dev/sysmon/sysmon_power.c Tue Aug 20 15:17:02 2019 +0000
+++ b/sys/dev/sysmon/sysmon_power.c Tue Aug 20 18:43:57 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sysmon_power.c,v 1.60 2019/03/01 11:06:56 pgoyette Exp $ */
+/* $NetBSD: sysmon_power.c,v 1.61 2019/08/20 18:43:57 maxv Exp $ */
/*-
* Copyright (c) 2007 Juan Romero Pardines.
@@ -69,7 +69,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sysmon_power.c,v 1.60 2019/03/01 11:06:56 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sysmon_power.c,v 1.61 2019/08/20 18:43:57 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_compat_netbsd.h"
@@ -331,6 +331,8 @@
if (!ped || !ped->dict || !pev_data)
return EINVAL;
+ memset(&pev, 0, sizeof(pev));
+
mutex_enter(&sysmon_power_event_queue_mtx);
switch (event) {
Home |
Main Index |
Thread Index |
Old Index