From: Thomas Pornin Date: Sat, 24 Dec 2016 02:20:03 +0000 (+0100) Subject: Fixed scheduling error (jumping back to failed engine, could lead to segfault). X-Git-Tag: v0.4~32 X-Git-Url: https://bearssl.org/gitweb//home/git/?a=commitdiff_plain;h=8bb8d74d4a5074b3845636a6bfac6be6240cc38e;p=BearSSL Fixed scheduling error (jumping back to failed engine, could lead to segfault). --- diff --git a/src/ssl/ssl_engine.c b/src/ssl/ssl_engine.c index 1f095f0..be78c5d 100644 --- a/src/ssl/ssl_engine.c +++ b/src/ssl/ssl_engine.c @@ -1091,6 +1091,9 @@ jump_handshake(br_ssl_engine_context *cc, int action) cc->hlen_out = hlen_out; cc->action = action; cc->hsrun(&cc->cpu); + if (br_ssl_engine_closed(cc)) { + return; + } if (cc->hbuf_out != cc->saved_hbuf_out) { sendpld_ack(cc, cc->hbuf_out - cc->saved_hbuf_out); }