chiark
/
gitweb
/
~mdw
/
catacomb
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
414a277
)
rand/noise.c: Fix foolish bug in the `getentropy' code.
author
Mark Wooding
<mdw@distorted.org.uk>
Thu, 26 Sep 2019 16:03:46 +0000
(17:03 +0100)
committer
Mark Wooding
<mdw@distorted.org.uk>
Fri, 27 Sep 2019 00:18:30 +0000
(
01:18
+0100)
I've probably never built this before. :-/
rand/noise.c
patch
|
blob
|
blame
|
history
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;