crypt32: Add an extra pointer alignment to avoid possible memory corruption.
This commit is contained in:
parent
4ed3f22082
commit
57b13b37d5
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue