release buffers fix was lost in merge. put it back.
authortedu <tedu@openbsd.org>
Sat, 19 Apr 2014 19:40:11 +0000 (19:40 +0000)
committertedu <tedu@openbsd.org>
Sat, 19 Apr 2014 19:40:11 +0000 (19:40 +0000)
lib/libssl/s3_pkt.c
lib/libssl/src/ssl/s3_pkt.c

index 52c48e9..60c5114 100644 (file)
@@ -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);
                        }
                }
index 52c48e9..60c5114 100644 (file)
@@ -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);
                        }
                }