diff --git a/js/src/jsarray.cpp b/js/src/jsarray.cpp index e1e0e3b2611..cd4435e2438 100644 --- a/js/src/jsarray.cpp +++ b/js/src/jsarray.cpp @@ -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;