aboutsummaryrefslogtreecommitdiff
path: root/openssl/ssl/s2_srvr.c
diff options
context:
space:
mode:
authorMike DePaulo <mikedep333@gmail.com>2015-01-10 12:26:41 -0500
committerMike DePaulo <mikedep333@gmail.com>2015-02-28 07:16:26 -0500
commit29d3851ef58419274f5f80a050d22b14319eff74 (patch)
treec70cbddb9c2100abb5e0e5fdd5acaf180b89b946 /openssl/ssl/s2_srvr.c
parenta1babdda61e8cb3f8d0608d87120ba46ca91a21d (diff)
downloadvcxsrv-29d3851ef58419274f5f80a050d22b14319eff74.tar.gz
vcxsrv-29d3851ef58419274f5f80a050d22b14319eff74.tar.bz2
vcxsrv-29d3851ef58419274f5f80a050d22b14319eff74.zip
Update openssl to version openssl-1.0.1k
Diffstat (limited to 'openssl/ssl/s2_srvr.c')
-rw-r--r--openssl/ssl/s2_srvr.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/openssl/ssl/s2_srvr.c b/openssl/ssl/s2_srvr.c
index 2cba426bb..59ced3f30 100644
--- a/openssl/ssl/s2_srvr.c
+++ b/openssl/ssl/s2_srvr.c
@@ -188,13 +188,21 @@ int ssl2_accept(SSL *s)
s->version=SSL2_VERSION;
s->type=SSL_ST_ACCEPT;
- buf=s->init_buf;
- if ((buf == NULL) && ((buf=BUF_MEM_new()) == NULL))
- { ret= -1; goto end; }
- if (!BUF_MEM_grow(buf,(int)
- SSL2_MAX_RECORD_LENGTH_3_BYTE_HEADER))
- { ret= -1; goto end; }
- s->init_buf=buf;
+ if(s->init_buf == NULL)
+ {
+ if ((buf=BUF_MEM_new()) == NULL)
+ {
+ ret= -1;
+ goto end;
+ }
+ if (!BUF_MEM_grow(buf,(int) SSL2_MAX_RECORD_LENGTH_3_BYTE_HEADER))
+ {
+ BUF_MEM_free(buf);
+ ret= -1;
+ goto end;
+ }
+ s->init_buf=buf;
+ }
s->init_num=0;
s->ctx->stats.sess_accept++;
s->handshake_func=ssl2_accept;