Skip to content

Commit

Permalink
Fix potential crash in tls_construct_finished.
Browse files Browse the repository at this point in the history
Reviewed-by: Matt Caswell <[email protected]>
(Merged from openssl#3667)
  • Loading branch information
bernd-edlinger committed Jul 3, 2017
1 parent c31ad0b commit b43c376
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ssl/statem/statem_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,12 @@ int tls_construct_finished(SSL *s, WPACKET *pkt)
&& (!s->method->ssl3_enc->change_cipher_state(s,
SSL3_CC_HANDSHAKE | SSL3_CHANGE_CIPHER_CLIENT_WRITE))) {
SSLerr(SSL_F_TLS_CONSTRUCT_FINISHED, SSL_R_CANNOT_CHANGE_CIPHER);
goto err;
/*
* This is a fatal error, which leaves
* enc_write_ctx in an inconsistent state
* and thus ssl3_send_alert may crash.
*/
return 0;
}

if (s->server) {
Expand Down

0 comments on commit b43c376

Please sign in to comment.