From: Dr. Stephen Henson Date: Fri, 30 Mar 2001 13:42:32 +0000 (+0000) Subject: Fix asn1_GetSequence() for indefinite length sequences. X-Git-Tag: OpenSSL_0_9_6a-beta3~2 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=ce3fc3956d0c6d292edb687ec8ad1e3c7e36ca02;p=oweals%2Fopenssl.git Fix asn1_GetSequence() for indefinite length sequences. --- diff --git a/CHANGES b/CHANGES index 13c729abb3..288d067f87 100644 --- a/CHANGES +++ b/CHANGES @@ -4,6 +4,12 @@ Changes between 0.9.6 and 0.9.6a [xx XXX 2001] + *) Fix for asn1_GetSequence() for indefinite length constructed data. + If SEQUENCE is length is indefinite just set c->slen to the total + amount of data available. + [Steve Henson, reported by shige@FreeBSD.org] + [This change does not apply to 0.9.7.] + *) Change bctest to avoid here-documents inside command substitution (workaround for FreeBSD /bin/sh bug). [Bodo Moeller] diff --git a/crypto/asn1/asn1_lib.c b/crypto/asn1/asn1_lib.c index 77447a5240..a8b651e54e 100644 --- a/crypto/asn1/asn1_lib.c +++ b/crypto/asn1/asn1_lib.c @@ -301,7 +301,7 @@ int asn1_GetSequence(ASN1_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); }