Commit 52a48f9e authored by Alessandro Ghedini's avatar Alessandro Ghedini Committed by Matt Caswell
Browse files

Validate ClientHello extension field length



RT#4069

Reviewed-by: default avatarEmilia Käsper <emilia@openssl.org>
Reviewed-by: default avatarMatt Caswell <matt@openssl.org>
parent 67202973
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1927,6 +1927,9 @@ static int ssl_scan_clienthello_tlsext(SSL *s, PACKET *pkt, int *al)
    if (!PACKET_get_net_2(pkt, &len))
        goto err;

    if (PACKET_remaining(pkt) != len)
        goto err;

    while (PACKET_get_net_2(pkt, &type) && PACKET_get_net_2(pkt, &size)) {
        PACKET subpkt;