From 5cc146f344bd2225e7afa66052a8401468b94ef4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bodo=20M=C3=B6ller?= Date: Thu, 22 Apr 1999 13:37:46 +0000 Subject: Fixed some race conditions. Submitted by: Reviewed by: PR: --- crypto/rand/md_rand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crypto/rand/md_rand.c') diff --git a/crypto/rand/md_rand.c b/crypto/rand/md_rand.c index dbf13e6..5b2db35 100644 --- a/crypto/rand/md_rand.c +++ b/crypto/rand/md_rand.c @@ -241,7 +241,6 @@ static void ssleay_rand_bytes(unsigned char *buf, int num) if (init) { - init=0; CRYPTO_w_unlock(CRYPTO_LOCK_RAND); /* put in some default random data, we need more than * just this */ @@ -281,6 +280,7 @@ static void ssleay_rand_bytes(unsigned char *buf, int num) memset(md,0,MD_DIGEST_LENGTH); #endif CRYPTO_w_lock(CRYPTO_LOCK_RAND); + init=0; } st_idx=state_index; -- cgit v1.1