Bug 418616 - fix use of uninitialized data in js_CheckAccess, patch by Blake Kaplan <mrbkap@gmail.com>, r+=shaver, a+=brendan

This commit is contained in:
crowder@fiverocks.com 2008-02-20 12:01:14 -08:00
parent 1fdaf7b67e
commit eff79b10d8

View File

@ -4311,8 +4311,11 @@ js_CheckAccess(JSContext *cx, JSObject *obj, jsid id, JSAccessMode mode,
OBJ_DROP_PROPERTY(cx, pobj, prop);
/* Avoid diverging for non-natives that reuse js_CheckAccess. */
if (pobj->map->ops->checkAccess == js_CheckAccess)
if (pobj->map->ops->checkAccess == js_CheckAccess) {
if (!writing)
*vp = JSVAL_VOID;
break;
}
return OBJ_CHECK_ACCESS(cx, pobj, id, mode, vp, attrsp);
}