Fix use-after-free after a deferred alert. The KLEE folks (who do symbolic execution of code) found a crash: http://marc.info/?l=openssl-dev&m=139809493725682&w=2
diff --git a/ssl/s3_pkt.c b/ssl/s3_pkt.c index a41399b..ebea57a 100644 --- a/ssl/s3_pkt.c +++ b/ssl/s3_pkt.c
@@ -678,6 +678,11 @@ /* if it went, fall through and send more stuff */ } + /* Dispatching the alert may have released the write buffer. */ + if (wb->buf == NULL) + if (!ssl3_setup_write_buffer(s)) + return -1; + if (len == 0) return 0;