Fixed scheduling error (jumping back to failed engine, could lead to segfault).

This commit is contained in:
Thomas Pornin 2016-12-24 03:20:03 +01:00
parent 4981173660
commit 8bb8d74d4a

View file

@ -1091,6 +1091,9 @@ jump_handshake(br_ssl_engine_context *cc, int action)
cc->hlen_out = hlen_out; cc->hlen_out = hlen_out;
cc->action = action; cc->action = action;
cc->hsrun(&cc->cpu); cc->hsrun(&cc->cpu);
if (br_ssl_engine_closed(cc)) {
return;
}
if (cc->hbuf_out != cc->saved_hbuf_out) { if (cc->hbuf_out != cc->saved_hbuf_out) {
sendpld_ack(cc, cc->hbuf_out - cc->saved_hbuf_out); sendpld_ack(cc, cc->hbuf_out - cc->saved_hbuf_out);
} }