From a90ae02454ed755a56a00943ea49195c6b565655 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bodo=20M=C3=B6ller?= Date: Thu, 19 Sep 2002 11:26:45 +0000 Subject: [PATCH] fix race condition PR: 262 --- CHANGES | 3 +++ ssl/s3_clnt.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index dbb70cb11..0cfe8adc9 100644 --- a/CHANGES +++ b/CHANGES @@ -1923,6 +1923,9 @@ des-cbc 3624.96k 5258.21k 5530.91k 5624.30k 5628.26k Changes between 0.9.6g and 0.9.6h [xx XXX xxxx] + *) Fix race condition in SSLv3_client_method(). + [Bodo Moeller] + *) Reorder cleanup sequence in SSL_CTX_free(): only remove the ex_data after the cached sessions are flushed, as the remove_cb() might use ex_data contents. Bug found by Sam Varshavchik diff --git a/ssl/s3_clnt.c b/ssl/s3_clnt.c index 3784e7d8c..ca15881ea 100644 --- a/ssl/s3_clnt.c +++ b/ssl/s3_clnt.c @@ -178,11 +178,11 @@ SSL_METHOD *SSLv3_client_method(void) if (init) { - init=0; memcpy((char *)&SSLv3_client_data,(char *)sslv3_base_method(), sizeof(SSL_METHOD)); SSLv3_client_data.ssl_connect=ssl3_connect; SSLv3_client_data.get_ssl_method=ssl3_get_client_method; + init=0; } return(&SSLv3_client_data); }