aboutsummaryrefslogtreecommitdiffstats
path: root/main/openssl/fix-use-after-free-without-freelist.patch
blob: 4734c75092eafe644cb700787f352ee3a54065c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
http://rt.openssl.org/Ticket/Attachment/37748/20587/

--- openssl-1.0.1g/ssl/s3_pkt.c.orig	2014-04-11 08:10:03.115295077 -0300
+++ openssl-1.0.1g/ssl/s3_pkt.c	2014-04-11 08:10:38.788435152 -0300
@@ -1055,7 +1055,7 @@
 				{
 				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);
 				}
 			}