[openssl-commits] [openssl] master update
Richard Levitte
levitte at openssl.org
Wed Jun 28 20:15:06 UTC 2017
The branch master has been updated
via afe9bba749b9fd897b7e7d416d904852d867d2c2 (commit)
from eed3ec90478af1e1fd3a2733293c751d2181f7f7 (commit)
- Log -----------------------------------------------------------------
commit afe9bba749b9fd897b7e7d416d904852d867d2c2
Author: Richard Levitte <levitte at openssl.org>
Date: Tue Jun 27 11:25:03 2017 +0200
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: Rich Salz <rsalz at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3779)
-----------------------------------------------------------------------
Summary of changes:
crypto/mem.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/crypto/mem.c b/crypto/mem.c
index 0584814..aa5ac56 100644
--- a/crypto/mem.c
+++ b/crypto/mem.c
@@ -112,6 +112,14 @@ static void parseit(void)
}
/*
+ * 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.
*/
static int shouldfail(void)
More information about the openssl-commits
mailing list