chiark
/
gitweb
/
~mdw
/
catacomb
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
rand/noise.c: Fix foolish bug in the `getentropy' code.
[catacomb]
/
rand
/
noise.c
diff --git
a/rand/noise.c
b/rand/noise.c
index 280c49cbe903bb4128d44e8e2a67b24ff960b4c8..c120e6f2d0e342acc02317aaf8fd0ca79d5ad1ed 100644
(file)
--- a/
rand/noise.c
+++ b/
rand/noise.c
@@
-217,7
+217,7
@@
int noise_devrandom(rand_pool *r)
/* --- OpenBSD-flavoured shinies --- */
while (n < sizeof(buf)) {
- nn = sizeof(buf) - n
n
;
+ nn = sizeof(buf) - n;
if (nn > 256) nn = 256;
if (getentropy(buf + n, nn)) break;
n += nn;