mirror of
https://github.com/openssl/openssl.git
synced 2024-12-21 07:53:57 +08:00
Check key_exchange data length is not 0
Reviewed-by: Rich Salz <rsalz@openssl.org>
This commit is contained in:
parent
2ee1271d8f
commit
323f212aa7
@ -2754,7 +2754,8 @@ static int ssl_scan_serverhello_tlsext(SSL *s, PACKET *pkt, int *al)
|
||||
|
||||
skey = ssl_generate_pkey(ckey);
|
||||
|
||||
if (!PACKET_as_length_prefixed_2(&spkt, &encoded_pt)) {
|
||||
if (!PACKET_as_length_prefixed_2(&spkt, &encoded_pt)
|
||||
|| PACKET_remaining(&encoded_pt) == 0) {
|
||||
*al = SSL_AD_DECODE_ERROR;
|
||||
SSLerr(SSL_F_SSL_SCAN_SERVERHELLO_TLSEXT,
|
||||
SSL_R_LENGTH_MISMATCH);
|
||||
|
Loading…
Reference in New Issue
Block a user