[njs] Fixed potential buffer overread in String.prototype.match().

Dmitry Volyntsev xeioex at nginx.com
Wed Jan 10 02:27:52 UTC 2024


details:   https://hg.nginx.org/njs/rev/476f7b3e617d
branches:  
changeset: 2264:476f7b3e617d
user:      Dmitry Volyntsev <xeioex at nginx.com>
date:      Tue Jan 09 17:56:19 2024 -0800
description:
Fixed potential buffer overread in String.prototype.match().

diffstat:

 src/njs_string.c |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r 50c587f74a09 -r 476f7b3e617d src/njs_string.c
--- a/src/njs_string.c	Tue Jan 09 09:14:42 2024 -0800
+++ b/src/njs_string.c	Tue Jan 09 17:56:19 2024 -0800
@@ -2797,7 +2797,7 @@ njs_string_prototype_match(njs_vm_t *vm,
 
 match:
 
-    return njs_regexp_prototype_exec(vm, arguments, nargs, unused, retval);
+    return njs_regexp_prototype_exec(vm, arguments, 2, unused, retval);
 }
 
 


More information about the nginx-devel mailing list