summaryrefslogtreecommitdiffstats
path: root/lib/libc/crypt/arc4random.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2014-06-25 04:22:08 +0000
committerderaadt <deraadt@openbsd.org>2014-06-25 04:22:08 +0000
commit99cf665f25ca2f397685e3e99008e057bd0aeaf9 (patch)
tree6c7de9200e83e9f957f9f24674a20affde3a90a6 /lib/libc/crypt/arc4random.c
parentImprove messages related to the roff(7) .so request. (diff)
downloadwireguard-openbsd-99cf665f25ca2f397685e3e99008e057bd0aeaf9.tar.xz
wireguard-openbsd-99cf665f25ca2f397685e3e99008e057bd0aeaf9.zip
document why we explicit_bzero
Diffstat (limited to 'lib/libc/crypt/arc4random.c')
-rw-r--r--lib/libc/crypt/arc4random.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/crypt/arc4random.c b/lib/libc/crypt/arc4random.c
index ea05d2a6e95..a306c6d8ab3 100644
--- a/lib/libc/crypt/arc4random.c
+++ b/lib/libc/crypt/arc4random.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: arc4random.c,v 1.36 2014/06/20 00:02:12 matthew Exp $ */
+/* $OpenBSD: arc4random.c,v 1.37 2014/06/25 04:22:08 deraadt Exp $ */
/*
* Copyright (c) 1996, David Mazieres <dm@uun.org>
@@ -99,7 +99,7 @@ _rs_stir(void)
_rs_init(rnd, sizeof(rnd));
else
_rs_rekey(rnd, sizeof(rnd));
- explicit_bzero(rnd, sizeof(rnd));
+ explicit_bzero(rnd, sizeof(rnd)); /* discard source seed */
/* invalidate rs_buf */
rs->rs_have = 0;