diff options
author | Bodo Möller <bodo@openssl.org> | 2002-09-25 17:38:57 +0200 |
---|---|---|
committer | Bodo Möller <bodo@openssl.org> | 2002-09-25 17:38:57 +0200 |
commit | b8565a9af9c6a4113b11764d2f79e799266a33c0 (patch) | |
tree | c784d28d5213a900b0783b8bff9efbe24c1950fd /ssl/s2_srvr.c | |
parent | Make sure that the signal storage is regarded as volatile. (diff) | |
download | openssl-b8565a9af9c6a4113b11764d2f79e799266a33c0.tar.xz openssl-b8565a9af9c6a4113b11764d2f79e799266a33c0.zip |
really fix race conditions
Submitted by: "Patrick McCormick" <patrick@tellme.com>
PR: 262
PR: 291
Diffstat (limited to 'ssl/s2_srvr.c')
-rw-r--r-- | ssl/s2_srvr.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/ssl/s2_srvr.c b/ssl/s2_srvr.c index d64d4e1ede..2efc14bc1a 100644 --- a/ssl/s2_srvr.c +++ b/ssl/s2_srvr.c @@ -147,11 +147,14 @@ SSL_METHOD *SSLv2_server_method(void) { CRYPTO_w_lock(CRYPTO_LOCK_SSL_METHOD); - memcpy((char *)&SSLv2_server_data,(char *)sslv2_base_method(), - sizeof(SSL_METHOD)); - SSLv2_server_data.ssl_accept=ssl2_accept; - SSLv2_server_data.get_ssl_method=ssl2_get_server_method; - init=0; + if (init) + { + memcpy((char *)&SSLv2_server_data,(char *)sslv2_base_method(), + sizeof(SSL_METHOD)); + SSLv2_server_data.ssl_accept=ssl2_accept; + SSLv2_server_data.get_ssl_method=ssl2_get_server_method; + init=0; + } CRYPTO_w_unlock(CRYPTO_LOCK_SSL_METHOD); } |