mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-06-01 10:19:27 +00:00
nsAttrAndChildArray::GrowBy() must check the return value of mozilla::CeilingLog2
This commit is contained in:
@@ -790,7 +790,12 @@ nsAttrAndChildArray::GrowBy(uint32_t aGrowSize)
|
||||
} while (size.value() < minSize.value());
|
||||
}
|
||||
else {
|
||||
size = 1u << mozilla::CeilingLog2(minSize.value());
|
||||
uint32_t shift = mozilla::CeilingLog2(minSize.value());
|
||||
if (shift >= 32) {
|
||||
return false;
|
||||
}
|
||||
|
||||
size = 1u << shift;
|
||||
}
|
||||
|
||||
bool needToInitialize = !mImpl;
|
||||
|
||||
Reference in New Issue
Block a user