From: tedu Date: Sat, 19 Apr 2014 19:40:11 +0000 (+0000) Subject: release buffers fix was lost in merge. put it back. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=35d6a12ded50b03b4adec8753ae03dbcbd9d22bf;p=openbsd release buffers fix was lost in merge. put it back. --- diff --git a/lib/libssl/s3_pkt.c b/lib/libssl/s3_pkt.c index 52c48e945e1..60c51146acb 100644 --- a/lib/libssl/s3_pkt.c +++ b/lib/libssl/s3_pkt.c @@ -986,7 +986,8 @@ start: if (rr->length == 0) { 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); } } diff --git a/lib/libssl/src/ssl/s3_pkt.c b/lib/libssl/src/ssl/s3_pkt.c index 52c48e945e1..60c51146acb 100644 --- a/lib/libssl/src/ssl/s3_pkt.c +++ b/lib/libssl/src/ssl/s3_pkt.c @@ -986,7 +986,8 @@ start: if (rr->length == 0) { 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); } }