Commit 6c3cca57 authored by Adam Eijdenberg's avatar Adam Eijdenberg
Browse files

Fix unhandled error condition in sslv2 client hello parsing.



--strict-warnings started showing warnings for this today...

Surely an error should be raised if these reads fail?

Reviewed-by: default avatarTim Hudson <tjh@openssl.org>
Reviewed-by: default avatarMatt Caswell <matt@openssl.org>
parent e77bdc73
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -1014,6 +1014,9 @@ int ssl3_get_client_hello(SSL *s)
        if (!PACKET_get_net_2(&pkt, &csl)
        if (!PACKET_get_net_2(&pkt, &csl)
                || !PACKET_get_net_2(&pkt, &sil)
                || !PACKET_get_net_2(&pkt, &sil)
                || !PACKET_get_net_2(&pkt, &cl)) {
                || !PACKET_get_net_2(&pkt, &cl)) {
            SSLerr(SSL_F_SSL3_GET_CLIENT_HELLO, SSL_R_LENGTH_TOO_SHORT);
            al = SSL_AD_DECODE_ERROR;
            goto f_err;
        }
        }


        if (csl == 0) {
        if (csl == 0) {