From 74c251cefda886b65e03a691158675a66203fbc6 Mon Sep 17 00:00:00 2001 From: Dmitry Volyntsev Date: Mon, 23 May 2022 22:26:35 -0700 Subject: [PATCH] Fixed Object.prototype.constructor property handler with large heap. Found by Memory Sanitizer. --- src/njs_object.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/njs_object.c b/src/njs_object.c index ad03bc32..c5176146 100644 --- a/src/njs_object.c +++ b/src/njs_object.c @@ -1849,7 +1849,7 @@ njs_int_t njs_object_prototype_create(njs_vm_t *vm, njs_object_prop_t *prop, njs_value_t *value, njs_value_t *setval, njs_value_t *retval) { - int32_t index; + int64_t index; njs_function_t *function; const njs_value_t *proto; @@ -2194,7 +2194,7 @@ njs_int_t njs_object_prototype_create_constructor(njs_vm_t *vm, njs_object_prop_t *prop, njs_value_t *value, njs_value_t *setval, njs_value_t *retval) { - int32_t index; + int64_t index; njs_value_t *cons, constructor; njs_object_t *object; njs_object_prototype_t *prototype; -- 2.47.3