Commit 87416f5a authored by Alexandre Julliard's avatar Alexandre Julliard

crypt32: Fix computation of structure sizes in CRYPT_AsnDecodeSequence.

parent fbc8ac47
......@@ -523,9 +523,11 @@ static BOOL CRYPT_AsnDecodeSequence(struct AsnDecodeSequenceItem items[],
for (i = 0; i < cItem; i++)
{
bytesNeeded += items[i].size;
if (items[i].size > items[i].minSize)
bytesNeeded += items[i].size - items[i].minSize;
structSize = max( structSize, items[i].offset + items[i].minSize );
}
bytesNeeded += structSize;
if (pcbDecoded)
*pcbDecoded = 1 + lenBytes + cbDecoded;
if (!pvStructInfo)
......
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