Possible overflow in ResizeSlots on 64-bit systems (517644, r=jorendorff).
This commit is contained in:
@@ -327,7 +327,7 @@ ResizeSlots(JSContext *cx, JSObject *obj, uint32 oldlen, uint32 newlen)
|
||||
}
|
||||
|
||||
slots = obj->dslots ? obj->dslots - 1 : NULL;
|
||||
newslots = (jsval *) cx->realloc(slots, (newlen + 1) * sizeof(jsval));
|
||||
newslots = (jsval *) cx->realloc(slots, (size_t(newlen) + 1) * sizeof(jsval));
|
||||
if (!newslots)
|
||||
return JS_FALSE;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user