diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2023-11-01 04:24:42 +0100 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2024-02-11 23:54:19 +0100 |
commit | e140122202cc24728b394f8f90fa2f4a2d7c397e (patch) | |
tree | 54652672087b6c196e820cbe468f9893c4cbb4e9 /quickjs.c | |
parent | 6dbf01bb1fb4bc00ef75f23628a135af95eb915c (diff) | |
download | quickjs-e140122202cc24728b394f8f90fa2f4a2d7c397e.tar.gz quickjs-e140122202cc24728b394f8f90fa2f4a2d7c397e.zip |
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.
Diffstat (limited to 'quickjs.c')
-rw-r--r-- | quickjs.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -14774,6 +14774,8 @@ static JSValue js_build_mapped_arguments(JSContext *ctx, int argc, if (JS_IsException(val)) return val; p = JS_VALUE_GET_OBJ(val); + p->u.array.u.values = NULL; + p->u.array.count = 0; /* add the length field (cannot fail) */ pr = add_property(ctx, p, JS_ATOM_length, |