summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2014-07-17 13:44:22 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2014-07-17 13:44:22 +0000
commit489d37804fb8d2a084230a2d0ad3851ad86390b3 (patch)
tree5b5262a18e4b0fa665a129dd0297b39b15bd32db /sys
parent23a72fcde5282166dc4e9163899f7162532c457a (diff)
zero random buf for sysctl too, just in case
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/kern_sysctl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c
index d89199df16a..f3405cde586 100644
--- a/sys/kern/kern_sysctl.c
+++ b/sys/kern/kern_sysctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_sysctl.c,v 1.258 2014/07/13 16:41:21 claudio Exp $ */
+/* $OpenBSD: kern_sysctl.c,v 1.259 2014/07/17 13:44:21 tedu Exp $ */
/* $NetBSD: kern_sysctl.c,v 1.17 1996/05/20 17:49:05 mrg Exp $ */
/*-
@@ -423,6 +423,7 @@ kern_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp, void *newp,
arc4random_buf(buf, *oldlenp);
if ((error = copyout(buf, oldp, *oldlenp)))
return (error);
+ explicit_bzero(buf, sizeof(buf));
}
return (0);
}