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

CHANGES
ssl/s3_lib.c

diff --git a/CHANGES b/CHANGES
index a5da898ddb20b942e6a7a7da94483568341c6811..f0d43922b97f8af0f61049debbaf661b254e0dca 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -4,6 +4,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)]
index e6091ef8166daf8e11da2a88622420207a7c037c..7e063969d2f5e2afb6e6571d90b71a6846f04d48 100644 (file)
@@ -1710,6 +1710,7 @@ void ssl3_clear(SSL *s)
        {
        unsigned char *rp,*wp;
        size_t rlen, wlen;
+       int init_extra;
 
        ssl3_cleanup_key_block(s);
        if (s->s3->tmp.ca_names != NULL)
@@ -1739,6 +1740,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;
 
        EVP_MD_CTX_cleanup(&s->s3->finish_dgst1);
        EVP_MD_CTX_cleanup(&s->s3->finish_dgst2);
@@ -1748,6 +1750,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);
 
@@ -2641,4 +2644,3 @@ need to go to SSL_ST_ACCEPT.
                }
        return(ret);
        }
-