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

wintrust: Make sure item size is at least the min size, and only align sizes that are greater.

parent 18ba0ae5
...@@ -1525,8 +1525,13 @@ static BOOL CRYPT_AsnDecodeSequenceItems(DWORD dwCertEncodingType, ...@@ -1525,8 +1525,13 @@ static BOOL CRYPT_AsnDecodeSequenceItems(DWORD dwCertEncodingType,
: NULL, &items[i].size); : NULL, &items[i].size);
if (ret) if (ret)
{ {
if (items[i].size < items[i].minSize)
items[i].size = items[i].minSize;
else if (items[i].size > items[i].minSize)
{
/* Account for alignment padding */ /* Account for alignment padding */
items[i].size = ALIGN_DWORD_PTR(items[i].size); items[i].size = ALIGN_DWORD_PTR(items[i].size);
}
TRACE("item %d size: %d\n", i, items[i].size); TRACE("item %d size: %d\n", i, items[i].size);
if (nextData && items[i].hasPointer && if (nextData && items[i].hasPointer &&
items[i].size > items[i].minSize) items[i].size > items[i].minSize)
......
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