diff options
author | Kurt Roeckx <kurt@roeckx.be> | 2017-01-05 19:59:14 +0100 |
---|---|---|
committer | Kurt Roeckx <kurt@roeckx.be> | 2017-01-06 18:26:58 +0100 |
commit | 68f4237c21bad35efb2b51c816a1d6c2f44ad45e (patch) | |
tree | 3fdb34cac391d69c5b7d50db81df31da28f42c8d /crypto | |
parent | d2aa960ee231cc28514d1385e1462909e966e74f (diff) |
Make rand_add predictable when fuzzing
Reviewed-by: Rich Salz <rsalz@openssl.org>
GH: #2182
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/rand/md_rand.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/crypto/rand/md_rand.c b/crypto/rand/md_rand.c index 88820bbb91..78da14a8e6 100644 --- 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) * |