Commit fa65c3f6 authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

crypt32: Don't check for the TLV after indefinite-length sequence items, the…

crypt32: Don't check for the TLV after indefinite-length sequence items, the item's decoder has already done so.
parent 09aec4f1
......@@ -376,28 +376,12 @@ static BOOL CRYPT_AsnDecodeSequenceItems(struct AsnDecodeSequenceItem items[],
}
else
{
if (itemLen == CMSG_INDEFINITE_LENGTH)
{
if (itemDecoded > itemEncodedLen - 2 ||
*(ptr + itemDecoded) != 0 ||
*(ptr + itemDecoded + 1) != 0)
{
TRACE("expected 0 TLV\n");
SetLastError(CRYPT_E_ASN1_CORRUPT);
ret = FALSE;
}
else
itemDecoded += 2;
}
if (ret)
{
ptr += itemDecoded;
decoded += itemDecoded;
TRACE("item %d: decoded %d bytes\n", i,
itemDecoded);
}
}
}
else if (items[i].optional &&
GetLastError() == CRYPT_E_ASN1_BADTAG)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment