Skip to content

Commit

Permalink
ssl: fix coverity 1451515: out of bounds memory access
Browse files Browse the repository at this point in the history
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from openssl#14585)
  • Loading branch information
paulidale committed Mar 18, 2021
1 parent 145f12d commit 3de7f01
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ssl/statem/statem_clnt.c
Original file line number Diff line number Diff line change
Expand Up @@ -2767,6 +2767,7 @@ static int tls_construct_cke_psk_preamble(SSL *s, WPACKET *pkt)

if (psklen > PSK_MAX_PSK_LEN) {
SSLfatal(s, SSL_AD_HANDSHAKE_FAILURE, ERR_R_INTERNAL_ERROR);
psklen = PSK_MAX_PSK_LEN; /* Avoid overrunning the array on cleanse */
goto err;
} else if (psklen == 0) {
SSLfatal(s, SSL_AD_HANDSHAKE_FAILURE, SSL_R_PSK_IDENTITY_NOT_FOUND);
Expand Down

0 comments on commit 3de7f01

Please sign in to comment.