Skip to content

Commit e140122

Browse files
committed
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.
1 parent 6dbf01b commit e140122

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

quickjs.c

+2
Original file line numberDiff line numberDiff line change
@@ -14774,6 +14774,8 @@ static JSValue js_build_mapped_arguments(JSContext *ctx, int argc,
1477414774
if (JS_IsException(val))
1477514775
return val;
1477614776
p = JS_VALUE_GET_OBJ(val);
14777+
p->u.array.u.values = NULL;
14778+
p->u.array.count = 0;
1477714779

1477814780
/* add the length field (cannot fail) */
1477914781
pr = add_property(ctx, p, JS_ATOM_length,

0 commit comments

Comments
 (0)