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:
d2aa960
)
Make rand_add predictable when fuzzing
author
Kurt Roeckx
<kurt@roeckx.be>
Thu, 5 Jan 2017 18:59:14 +0000
(19:59 +0100)
committer
Kurt Roeckx
<kurt@roeckx.be>
Fri, 6 Jan 2017 17:26:58 +0000
(18:26 +0100)
Reviewed-by: Rich Salz <rsalz@openssl.org>
GH: #2182
crypto/rand/md_rand.c
patch
|
blob
|
history
diff --git
a/crypto/rand/md_rand.c
b/crypto/rand/md_rand.c
index 88820bbb917674e18644d308d862c6ec30d612e2..78da14a8e602717a60792d777bf2aab2f6d18f6a 100644
(file)
--- a/
crypto/rand/md_rand.c
+++ b/
crypto/rand/md_rand.c
@@
-126,6
+126,11
@@
static int rand_add(const void *buf, int num, double add)
if (!num)
return 1;
+#ifdef PREDICT
+ if (rand_predictable)
+ return 1;
+#endif
+
/*
* (Based on the rand(3) manpage)
*