From: Dmitry Volyntsev Date: Tue, 24 May 2022 05:26:35 +0000 (-0700) Subject: Fixed Object.prototype.constructor property handler with large heap. X-Git-Tag: 0.7.4~3 X-Git-Url: http://www.kaiwu.me/postgresql/commit/?a=commitdiff_plain;h=74c251cefda886b65e03a691158675a66203fbc6;p=njs.git Fixed Object.prototype.constructor property handler with large heap. Found by Memory Sanitizer. --- 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;