From e9665f37f163338cd6233efb0a1a90f62296a32a Mon Sep 17 00:00:00 2001 From: tedu Date: Thu, 17 Jul 2014 13:44:21 +0000 Subject: [PATCH] zero random buf for sysctl too, just in case --- sys/kern/kern_sysctl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); } -- 2.20.1