]> granicus.if.org Git - openssl/commitdiff
Fix use after free.
authorBen Laurie <ben@links.org>
Wed, 23 Apr 2014 06:24:03 +0000 (07:24 +0100)
committerBen Laurie <ben@links.org>
Wed, 23 Apr 2014 06:33:26 +0000 (07:33 +0100)
ssl/s3_pkt.c

index a41279eaf48a3a4e7cb38ff06f29891cdfb4e71d..0f33204bada801a5576671797acfb45fcaed3fe3 100644 (file)
@@ -1015,7 +1015,7 @@ start:
                                {
                                s->rstate=SSL_ST_READ_HEADER;
                                rr->off=0;
-                               if (s->mode & SSL_MODE_RELEASE_BUFFERS)
+                               if (s->mode & SSL_MODE_RELEASE_BUFFERS && s->s3->rbuf.left == 0)
                                        ssl3_release_read_buffer(s);
                                }
                        }