提交 afe9bba7 编写于 作者: R Richard Levitte

crypto/mem.c: on Windows, use rand() instead of random()

Windows doesn't provide random().  In this particular case, our
requirements on the quality of randomness isn't high, so we don't
need to care how good randomness rand() does or doesn't provide.

Fixes #3778
Reviewed-by: NRich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3779)
上级 eed3ec90
...@@ -111,6 +111,14 @@ static void parseit(void) ...@@ -111,6 +111,14 @@ static void parseit(void)
md_failstring = semi; md_failstring = semi;
} }
/*
* Windows doesn't have random(), but it has rand()
* Some rand() implementations aren't good, but we're not
* dealing with secure randomness here.
*/
#ifdef _WIN32
# define random() rand()
#endif
/* /*
* See if the current malloc should fail. * See if the current malloc should fail.
*/ */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册