summaryrefslogtreecommitdiff
path: root/usr.sbin/snmpd
diff options
context:
space:
mode:
authorBret Lambert <blambert@cvs.openbsd.org>2014-04-14 07:18:06 +0000
committerBret Lambert <blambert@cvs.openbsd.org>2014-04-14 07:18:06 +0000
commitf0a6c745cb5a43a13a9359749cc19a4cb11090eb (patch)
tree9360d3e57b72f7dee9b01b321b960884f825cb08 /usr.sbin/snmpd
parent1e59526f27f08373b01e068658a08a00a03c4281 (diff)
Fix the following idiom in the following way:
arc4random_buf(seed, sizeof(seed)); RAND_seed(seed, sizeof(seed)); + explicit_bzero(seed, sizeof(seed)); ok reyk@
Diffstat (limited to 'usr.sbin/snmpd')
-rw-r--r--usr.sbin/snmpd/proc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/snmpd/proc.c b/usr.sbin/snmpd/proc.c
index 94990eb1f92..5f0cd4cf96e 100644
--- a/usr.sbin/snmpd/proc.c
+++ b/usr.sbin/snmpd/proc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: proc.c,v 1.3 2014/02/14 10:38:09 florian Exp $ */
+/* $OpenBSD: proc.c,v 1.4 2014/04/14 07:18:05 blambert Exp $ */
/*
* Copyright (c) 2010-2013 Reyk Floeter <reyk@openbsd.org>
@@ -281,6 +281,7 @@ proc_run(struct privsep *ps, struct privsep_proc *p,
arc4random_buf(seed, sizeof(seed));
RAND_seed(seed, sizeof(seed));
+ explicit_bzero(seed, sizeof(seed));
if (p->p_id == PROC_CONTROL) {
TAILQ_INIT(&ctl_conns);