提交 e512840d 编写于 作者: K Kurt Roeckx

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: NRich Salz <rsalz@openssl.org>
GH: #2041
上级 231f1337
......@@ -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++;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册