]> git.kaiwu.me - njs.git/commitdiff
Fixed potential buffer overread in String.prototype.match().
authorDmitry Volyntsev <xeioex@nginx.com>
Wed, 10 Jan 2024 01:56:19 +0000 (17:56 -0800)
committerDmitry Volyntsev <xeioex@nginx.com>
Wed, 10 Jan 2024 01:56:19 +0000 (17:56 -0800)
src/njs_string.c

index 3b3ca12cf6e6c28c9e0b4aacd9d5b192d70bd66c..3a944ecd910c411f78e2218bf146704aa4922320 100644 (file)
@@ -2797,7 +2797,7 @@ njs_string_prototype_match(njs_vm_t *vm, njs_value_t *args, njs_uint_t nargs,
 
 match:
 
-    return njs_regexp_prototype_exec(vm, arguments, nargs, unused, retval);
+    return njs_regexp_prototype_exec(vm, arguments, 2, unused, retval);
 }