Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/openssl/openssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/ssl
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2002-12-28 05:01:45 +0300
committerRichard Levitte <levitte@openssl.org>2002-12-28 05:01:45 +0300
commit2b4a238b5b633cb9f7a11cd77c576cc15b3fe0ad (patch)
tree8945bacfac07d8b91178937d42cd501ba01db84f /ssl
parentf0c5491e9e2126c15aa6ec291d2216e65bc11013 (diff)
Recent changes from 0.9.6-stable.
Diffstat (limited to 'ssl')
-rw-r--r--ssl/s23_clnt.c5
-rw-r--r--ssl/s2_clnt.c5
-rw-r--r--ssl/s3_clnt.c5
3 files changed, 13 insertions, 2 deletions
diff --git a/ssl/s23_clnt.c b/ssl/s23_clnt.c
index 105e16aeae..8c198d44b3 100644
--- a/ssl/s23_clnt.c
+++ b/ssl/s23_clnt.c
@@ -105,7 +105,7 @@ SSL_METHOD *SSLv23_client_method(void)
int ssl23_connect(SSL *s)
{
- BUF_MEM *buf;
+ BUF_MEM *buf=NULL;
unsigned long Time=time(NULL);
void (*cb)()=NULL;
int ret= -1;
@@ -159,6 +159,7 @@ int ssl23_connect(SSL *s)
goto end;
}
s->init_buf=buf;
+ buf=NULL;
}
if (!ssl3_setup_buffers(s)) { ret= -1; goto end; }
@@ -207,6 +208,8 @@ int ssl23_connect(SSL *s)
}
end:
s->in_handshake--;
+ if (buf != NULL)
+ BUF_MEM_free(buf);
if (cb != NULL)
cb(s,SSL_CB_CONNECT_EXIT,ret);
return(ret);
diff --git a/ssl/s2_clnt.c b/ssl/s2_clnt.c
index 5c40996e1c..61adfcf199 100644
--- a/ssl/s2_clnt.c
+++ b/ssl/s2_clnt.c
@@ -208,10 +208,13 @@ int ssl2_connect(SSL *s)
if (!BUF_MEM_grow(buf,
SSL2_MAX_RECORD_LENGTH_3_BYTE_HEADER))
{
+ if (buf == s->init_buf)
+ buf=NULL;
ret= -1;
goto end;
}
s->init_buf=buf;
+ buf=NULL;
s->init_num=0;
s->state=SSL2_ST_SEND_CLIENT_HELLO_A;
s->ctx->stats.sess_connect++;
@@ -338,6 +341,8 @@ int ssl2_connect(SSL *s)
}
end:
s->in_handshake--;
+ if (buf != NULL)
+ BUF_MEM_free(buf);
if (cb != NULL)
cb(s,SSL_CB_CONNECT_EXIT,ret);
return(ret);
diff --git a/ssl/s3_clnt.c b/ssl/s3_clnt.c
index c32a95581d..60c97ee629 100644
--- a/ssl/s3_clnt.c
+++ b/ssl/s3_clnt.c
@@ -164,7 +164,7 @@ SSL_METHOD *SSLv3_client_method(void)
int ssl3_connect(SSL *s)
{
- BUF_MEM *buf;
+ BUF_MEM *buf=NULL;
unsigned long Time=time(NULL),l;
long num1;
void (*cb)()=NULL;
@@ -225,6 +225,7 @@ int ssl3_connect(SSL *s)
goto end;
}
s->init_buf=buf;
+ buf=NULL;
}
if (!ssl3_setup_buffers(s)) { ret= -1; goto end; }
@@ -503,6 +504,8 @@ int ssl3_connect(SSL *s)
}
end:
s->in_handshake--;
+ if (buf != NULL)
+ BUF_MEM_free(buf);
if (cb != NULL)
cb(s,SSL_CB_CONNECT_EXIT,ret);
return(ret);