]> 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:30:16 +0000 (07:30 +0100)
ssl/s3_pkt.c

index a41c54f11bcad6c12bee63a2b968c18fc71ad95c..8290f87290fe3b38c53b9943d169b0bc2272b768 100644 (file)
@@ -1239,7 +1239,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);
                                }
                        }