mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1193572, part 2 - nsXULPrototypeElement::Deserialize should use fallible SetCapacity. r=baku
I think this prevents a crash if we end up with a bogus cache value.
This commit is contained in:
parent
e75d7d53b5
commit
4a99525af2
@ -2318,7 +2318,9 @@ nsXULPrototypeElement::Deserialize(nsIObjectInputStream* aStream,
|
||||
uint32_t numChildren = int32_t(number);
|
||||
|
||||
if (numChildren > 0) {
|
||||
mChildren.SetCapacity(numChildren);
|
||||
if (!mChildren.SetCapacity(numChildren, fallible)) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
for (uint32_t i = 0; i < numChildren; i++) {
|
||||
rv = aStream->Read32(&number);
|
||||
|
Loading…
Reference in New Issue
Block a user