Commit 5db2a579 authored by Dr. Stephen Henson's avatar Dr. Stephen Henson
Browse files

Calculate sequence length properly.



Use correct length in old ASN.1 indefinite length sequence decoder
(only used by SSL_SESSION).

This bug was discovered by Hanno Böck using libfuzzer.

Reviewed-by: default avatarRich Salz <rsalz@openssl.org>
(cherry picked from commit 436dead2)
parent c648bdcc
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -328,7 +328,7 @@ int asn1_GetSequence(ASN1_const_CTX *c, long *length)
        return (0);
    }
    if (c->inf == (1 | V_ASN1_CONSTRUCTED))
        c->slen = *length + *(c->pp) - c->p;
        c->slen = *length;
    c->eos = 0;
    return (1);
}