Commit 57b13b37 authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

crypt32: Add an extra pointer alignment to avoid possible memory corruption.

parent 4ed3f220
...@@ -1800,6 +1800,9 @@ static DWORD CRYPT_SizeOfAttributes(const CRYPT_ATTRIBUTES *attr) ...@@ -1800,6 +1800,9 @@ static DWORD CRYPT_SizeOfAttributes(const CRYPT_ATTRIBUTES *attr)
for (j = 0; j < attr->rgAttr[i].cValue; j++) for (j = 0; j < attr->rgAttr[i].cValue; j++)
size += attr->rgAttr[i].rgValue[j].cbData; size += attr->rgAttr[i].rgValue[j].cbData;
} }
/* align pointer again to be conservative */
if (size % sizeof(DWORD_PTR))
size += size % sizeof(DWORD_PTR);
return size; return size;
} }
......
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