asn1: Fix handling of invalid ASN.1 length in is_asn1()
Fixes CVE-2013-5018.
This commit is contained in:
committed by
Andreas Steffen
parent
cc5bedbb98
commit
b3393c88c1
@@ -642,6 +642,11 @@ bool is_asn1(chunk_t blob)
|
|||||||
|
|
||||||
len = asn1_length(&blob);
|
len = asn1_length(&blob);
|
||||||
|
|
||||||
|
if (len == ASN1_INVALID_LENGTH)
|
||||||
|
{
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
/* exact match */
|
/* exact match */
|
||||||
if (len == blob.len)
|
if (len == blob.len)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user