From: Bodo Möller Date: Thu, 13 Oct 2011 13:05:12 +0000 (+0000) Subject: In ssl3_clear, preserve s3->init_extra along with s3->rbuf. X-Git-Tag: OpenSSL_1_0_0f~29 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=48373e55d10c4f18eeb1b54f752b9c98d3d7e136;p=oweals%2Fopenssl.git In ssl3_clear, preserve s3->init_extra along with s3->rbuf. Submitted by: Bob Buckholz --- diff --git a/CHANGES b/CHANGES index 42632788e3..717b036f63 100644 --- a/CHANGES +++ b/CHANGES @@ -4,7 +4,8 @@ Changes between 1.0.0e and 1.0.0f [xx XXX xxxx] - *) + *) In ssl3_clear, preserve s3->init_extra along with s3->rbuf. + [Bob Buckholz (Google)] Changes between 1.0.0d and 1.0.0e [6 Sep 2011] @@ -913,6 +914,9 @@ Changes between 0.9.8r and 0.9.8s [xx XXX xxxx] + *) In ssl3_clear, preserve s3->init_extra along with s3->rbuf. + [Bob Buckholz (Google)] + *) Fix SSL memory handling for (EC)DH ciphersuites, in particular for multi-threaded use of ECDH. [Adam Langley (Google)] diff --git a/ssl/s3_lib.c b/ssl/s3_lib.c index 62c791cb72..1130244aeb 100644 --- a/ssl/s3_lib.c +++ b/ssl/s3_lib.c @@ -2177,6 +2177,7 @@ void ssl3_clear(SSL *s) { unsigned char *rp,*wp; size_t rlen, wlen; + int init_extra; #ifdef TLSEXT_TYPE_opaque_prf_input if (s->s3->client_opaque_prf_input != NULL) @@ -2215,6 +2216,7 @@ void ssl3_clear(SSL *s) wp = s->s3->wbuf.buf; rlen = s->s3->rbuf.len; wlen = s->s3->wbuf.len; + init_extra = s->s3->init_extra; if (s->s3->handshake_buffer) { BIO_free(s->s3->handshake_buffer); s->s3->handshake_buffer = NULL; @@ -2227,6 +2229,7 @@ void ssl3_clear(SSL *s) s->s3->wbuf.buf = wp; s->s3->rbuf.len = rlen; s->s3->wbuf.len = wlen; + s->s3->init_extra = init_extra; ssl_free_wbio_buffer(s);