crypt32: Don't check for the TLV after indefinite-length sequence items, the item's decoder has already done so.
This commit is contained in:
parent
09aec4f155
commit
fa65c3f634
|
@ -376,26 +376,10 @@ static BOOL CRYPT_AsnDecodeSequenceItems(struct AsnDecodeSequenceItem items[],
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (itemLen == CMSG_INDEFINITE_LENGTH)
|
ptr += itemDecoded;
|
||||||
{
|
decoded += itemDecoded;
|
||||||
if (itemDecoded > itemEncodedLen - 2 ||
|
TRACE("item %d: decoded %d bytes\n", i,
|
||||||
*(ptr + itemDecoded) != 0 ||
|
itemDecoded);
|
||||||
*(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 &&
|
else if (items[i].optional &&
|
||||||
|
|
Loading…
Reference in New Issue