From: tedu Date: Thu, 17 Jul 2014 13:44:21 +0000 (+0000) Subject: zero random buf for sysctl too, just in case X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=e9665f37f163338cd6233efb0a1a90f62296a32a;p=openbsd zero random buf for sysctl too, just in case --- 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); }