mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1153090 followup - consistently use sizeof(hash) r=dkeeler
This commit is contained in:
parent
3029343eeb
commit
13c5620ed7
@ -95,10 +95,12 @@ uint32_t
|
||||
CertBlocklistItem::Hash() const
|
||||
{
|
||||
uint32_t hash;
|
||||
// there's no requirement for a serial to be as large as 32 bits; if it's
|
||||
// smaller, fall back to the first octet (otherwise, the last four)
|
||||
if (mItemMechanism == BlockByIssuerAndSerial && mOtherLength >= 4) {
|
||||
memcpy(&hash, mOtherData + mOtherLength - 4, sizeof(hash));
|
||||
// there's no requirement for a serial to be as large as the size of the hash
|
||||
// key; if it's smaller, fall back to the first octet (otherwise, the last
|
||||
// four)
|
||||
if (mItemMechanism == BlockByIssuerAndSerial &&
|
||||
mOtherLength >= sizeof(hash)) {
|
||||
memcpy(&hash, mOtherData + mOtherLength - sizeof(hash), sizeof(hash));
|
||||
} else {
|
||||
hash = *mOtherData;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user