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

index b9e45c74bc5c8c04cc7c2e023eb484162491e362..d601a1817182f88108a3ef34017c37e8027df97b 100644 (file)
@@ -1334,7 +1334,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);
                                }
                        }