asn1: Fix handling of invalid ASN.1 length in is_asn1()

Fixes CVE-2013-5018.
This commit is contained in:
Tobias Brunner
2013-07-31 22:16:58 +02:00
committed by Andreas Steffen
parent cc5bedbb98
commit b3393c88c1
+5
View File
@@ -642,6 +642,11 @@ bool is_asn1(chunk_t blob)
len = asn1_length(&blob);
if (len == ASN1_INVALID_LENGTH)
{
return FALSE;
}
/* exact match */
if (len == blob.len)
{