summaryrefslogtreecommitdiffstats
path: root/ssl/s2_srvr.c
diff options
context:
space:
mode:
authorBodo Möller <bodo@openssl.org>2002-09-25 17:38:57 +0200
committerBodo Möller <bodo@openssl.org>2002-09-25 17:38:57 +0200
commitb8565a9af9c6a4113b11764d2f79e799266a33c0 (patch)
treec784d28d5213a900b0783b8bff9efbe24c1950fd /ssl/s2_srvr.c
parentMake sure that the signal storage is regarded as volatile. (diff)
downloadopenssl-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.c13
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);
}