nsAttrAndChildArray::GrowBy() must check the return value of mozilla::CeilingLog2

This commit is contained in:
Pale Moon
2017-02-01 16:24:13 +01:00
committed by roytam1
parent 3456c5c8c4
commit 2ef64efbd9
+6 -1
View File
@@ -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;