In ssl3_clear, preserve s3->init_extra along with s3->rbuf.
authorBodo Möller <bodo@openssl.org>
Thu, 13 Oct 2011 13:05:12 +0000 (13:05 +0000)
committerBodo Möller <bodo@openssl.org>
Thu, 13 Oct 2011 13:05:12 +0000 (13:05 +0000)
Submitted by: Bob Buckholz <bbuckholz@google.com>

CHANGES
ssl/s3_lib.c

diff --git a/CHANGES b/CHANGES
index 42632788e38a48e76a937f012c1f65bfd0efaae7..717b036f6332f56c8a66a7924863780dc4ece583 100644 (file)
--- 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]
 
   
  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)]
index 62c791cb724243ad8253f529b5a939db5090e868..1130244aeb62f57e8299cc4a5e95414a44933676 100644 (file)
@@ -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);