Fixed scheduling error (jumping back to failed engine, could lead to segfault).
authorThomas Pornin <pornin@bolet.org>
Sat, 24 Dec 2016 02:20:03 +0000 (03:20 +0100)
committerThomas Pornin <pornin@bolet.org>
Sat, 24 Dec 2016 02:20:03 +0000 (03:20 +0100)
src/ssl/ssl_engine.c

index 1f095f0..be78c5d 100644 (file)
@@ -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);
                }