make der_get_octet_string_ber less restrictive

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24203 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2008-12-15 04:32:39 +00:00
parent be7861f63b
commit 5f2da72d8a

View File

@@ -269,8 +269,8 @@ der_get_octet_string_ber (const unsigned char *p, size_t len,
if (e) goto out;
if (class != ASN1_C_UNIV) return ASN1_BAD_ID;
if (type == PRIM && tag == UT_EndOfContent) {
if (depth < 1)
return ASN1_INDEF_UNDERRUN;
if (depth == 0)
break;
depth--;
}
if (tag != UT_OctetString) {