From: Kurt Roeckx Date: Wed, 7 Dec 2016 22:05:16 +0000 (+0100) Subject: Make the predictable numbers start from 1 X-Git-Tag: OpenSSL_1_1_1-pre1~2874 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=e512840d7a691ec372453bcb5f42e00eec180b18;p=oweals%2Fopenssl.git Make the predictable numbers start from 1 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 GH: #2041 --- diff --git a/crypto/rand/md_rand.c b/crypto/rand/md_rand.c index 0cf6e90834..88820bbb91 100644 --- 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++;