projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
231f133
)
Make the predictable numbers start from 1
author
Kurt Roeckx
<kurt@roeckx.be>
Wed, 7 Dec 2016 22:05:16 +0000
(23:05 +0100)
committer
Kurt Roeckx
<kurt@roeckx.be>
Thu, 8 Dec 2016 18:06:18 +0000
(19:06 +0100)
There is code that retries calling RAND_bytes() until it gets something
other than 0, which just hangs if we always return 0.
Reviewed-by: Rich Salz <rsalz@openssl.org>
GH: #2041
crypto/rand/md_rand.c
patch
|
blob
|
history
diff --git
a/crypto/rand/md_rand.c
b/crypto/rand/md_rand.c
index 0cf6e90834820f129ec29b7f6806e17df09b5c53..88820bbb917674e18644d308d862c6ec30d612e2 100644
(file)
--- a/
crypto/rand/md_rand.c
+++ b/
crypto/rand/md_rand.c
@@
-307,7
+307,7
@@
static int rand_bytes(unsigned char *buf, int num, int pseudo)
#ifdef PREDICT
if (rand_predictable) {
- unsigned char val =
0
;
+ unsigned char val =
1
;
for (i = 0; i < num; i++)
buf[i] = val++;