Fix use after free.

(Imported from upstream's a0fe2e72c48166c9c4bb423397723de1fb6227b0)
This commit is contained in:
Adam Langley 2014-06-20 12:00:00 -07:00
parent 548523fd5e
commit 4a35a93a12

View File

@ -1072,7 +1072,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);
}
}