crypt32: Fix computation of structure sizes in CRYPT_AsnDecodeSequence.

This commit is contained in:
Alexandre Julliard 2010-04-07 23:07:43 +02:00
parent fbc8ac470f
commit 87416f5a3b
1 changed files with 3 additions and 1 deletions

View File

@ -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)