diff options
author | Bodo Möller <bodo@openssl.org> | 1999-04-22 13:37:46 +0000 |
---|---|---|
committer | Bodo Möller <bodo@openssl.org> | 1999-04-22 13:37:46 +0000 |
commit | 5cc146f344bd2225e7afa66052a8401468b94ef4 (patch) | |
tree | fed6103a36e32b130cb0ec6ba4ae6c4c9540f848 /crypto | |
parent | 4cd401e401c4526768f0ca9257129e749431b384 (diff) |
Fixed some race conditions.
Submitted by:
Reviewed by:
PR:
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/des/ecb_enc.c | 2 | ||||
-rw-r--r-- | crypto/rand/md_rand.c | 2 | ||||
-rw-r--r-- | crypto/x509v3/v3err.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/crypto/des/ecb_enc.c b/crypto/des/ecb_enc.c index 6c0e5a4106..9de7b1d5c9 100644 --- a/crypto/des/ecb_enc.c +++ b/crypto/des/ecb_enc.c @@ -72,7 +72,6 @@ const char *des_options(void) { const char *ptr,*unroll,*risc,*size; - init=0; #ifdef DES_PTR ptr="ptr"; #else @@ -98,6 +97,7 @@ const char *des_options(void) else size="long"; sprintf(buf,"des(%s,%s,%s,%s)",ptr,risc,unroll,size); + init=0; } return(buf); } diff --git a/crypto/rand/md_rand.c b/crypto/rand/md_rand.c index dbf13e686f..5b2db35aae 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; diff --git a/crypto/x509v3/v3err.c b/crypto/x509v3/v3err.c index a00dda754f..febd36dfce 100644 --- a/crypto/x509v3/v3err.c +++ b/crypto/x509v3/v3err.c @@ -151,7 +151,7 @@ static ERR_STRING_DATA X509V3_str_reasons[]= #endif -void ERR_load_X509V3_strings(void) +void ERR_load_X509V3_strings() { static int init=1; |