crypt32: Fix computation of structure sizes in CRYPT_AsnDecodeSequence.
This commit is contained in:
parent
fbc8ac470f
commit
87416f5a3b
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue