fixed DoS vulnerability in the parsing of distinguished names

This commit is contained in:
Andreas Steffen
2009-06-09 22:03:33 +02:00
parent 260158e53e
commit b29832c74f
2 changed files with 6 additions and 1 deletions
+5
View File
@@ -296,6 +296,11 @@ size_t asn1_length(chunk_t *blob)
len = 256*len + *blob->ptr++;
blob->len--;
}
if (len > blob->len)
{
DBG2("length is larger than remaining blob size");
return ASN1_INVALID_LENGTH;
}
return len;
}