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: Rich Salz <rsalz@openssl.org>
(cherry picked from commit 436dead2e2
)
This commit is contained in:
parent
c648bdcc4c
commit
5db2a579b7
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue