crypt32: Check length of sequence before checking tag.

This commit is contained in:
Juan Lang 2008-09-08 12:30:01 -07:00 committed by Alexandre Julliard
parent 3dbdb31128
commit 254f9b9c01
1 changed files with 5 additions and 0 deletions

View File

@ -475,6 +475,11 @@ static BOOL CRYPT_AsnDecodeSequence(struct AsnDecodeSequenceItem items[],
cbEncoded, dwFlags, pDecodePara, pvStructInfo, *pcbStructInfo,
startingPointer);
if (!cbEncoded)
{
SetLastError(CRYPT_E_ASN1_EOD);
return FALSE;
}
if (pbEncoded[0] == ASN_SEQUENCE)
{
DWORD dataLen;