mirror of
https://github.com/bellard/quickjs.git
synced 2024-11-22 21:58:12 +08:00
Fix sloppy mode arguments uninitialized value use
MemorySanitizer complained about uninitialized reads in the indexed property code path in JS_GetPropertyValue() with JS_CLASS_MAPPED_ARGUMENTS objects.
This commit is contained in:
parent
6dbf01bb1f
commit
e140122202
@ -14774,6 +14774,8 @@ static JSValue js_build_mapped_arguments(JSContext *ctx, int argc,
|
|||||||
if (JS_IsException(val))
|
if (JS_IsException(val))
|
||||||
return val;
|
return val;
|
||||||
p = JS_VALUE_GET_OBJ(val);
|
p = JS_VALUE_GET_OBJ(val);
|
||||||
|
p->u.array.u.values = NULL;
|
||||||
|
p->u.array.count = 0;
|
||||||
|
|
||||||
/* add the length field (cannot fail) */
|
/* add the length field (cannot fail) */
|
||||||
pr = add_property(ctx, p, JS_ATOM_length,
|
pr = add_property(ctx, p, JS_ATOM_length,
|
||||||
|
Loading…
Reference in New Issue
Block a user