crypt32: Check length of sequence before checking tag.
This commit is contained in:
parent
3dbdb31128
commit
254f9b9c01
@ -475,6 +475,11 @@ static BOOL CRYPT_AsnDecodeSequence(struct AsnDecodeSequenceItem items[],
|
|||||||
cbEncoded, dwFlags, pDecodePara, pvStructInfo, *pcbStructInfo,
|
cbEncoded, dwFlags, pDecodePara, pvStructInfo, *pcbStructInfo,
|
||||||
startingPointer);
|
startingPointer);
|
||||||
|
|
||||||
|
if (!cbEncoded)
|
||||||
|
{
|
||||||
|
SetLastError(CRYPT_E_ASN1_EOD);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
if (pbEncoded[0] == ASN_SEQUENCE)
|
if (pbEncoded[0] == ASN_SEQUENCE)
|
||||||
{
|
{
|
||||||
DWORD dataLen;
|
DWORD dataLen;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user