artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e85b21c
)
clear a stack buffer with explicit_bzero
author
tedu
<tedu@openbsd.org>
Tue, 6 May 2014 15:37:57 +0000
(15:37 +0000)
committer
tedu
<tedu@openbsd.org>
Tue, 6 May 2014 15:37:57 +0000
(15:37 +0000)
lib/libc/crypt/arc4random.c
patch
|
blob
|
history
diff --git
a/lib/libc/crypt/arc4random.c
b/lib/libc/crypt/arc4random.c
index
57acc0d
..
57decde
100644
(file)
--- a/
lib/libc/crypt/arc4random.c
+++ b/
lib/libc/crypt/arc4random.c
@@
-1,4
+1,4
@@
-/* $OpenBSD: arc4random.c,v 1.2
8 2014/05/06 02:31:45
tedu Exp $ */
+/* $OpenBSD: arc4random.c,v 1.2
9 2014/05/06 15:37:57
tedu Exp $ */
/*
* Copyright (c) 1996, David Mazieres <dm@uun.org>
@@
-92,7
+92,7
@@
_rs_stir(void)
_rs_init(rnd, sizeof(rnd));
} else
_rs_rekey(rnd, sizeof(rnd));
-
memset(rnd, 0
, sizeof(rnd));
+
explicit_bzero(rnd
, sizeof(rnd));
/* invalidate rs_buf */
rs_have = 0;