Welcome! Log In Create A New Profile

Advanced

[njs] Increased maximum allowed recursion depth in parser and generator.

Dmitry Volyntsev
October 04, 2019 12:52PM
details: https://hg.nginx.org/njs/rev/5c71fd61dc15
branches:
changeset: 1172:5c71fd61dc15
user: Dmitry Volyntsev <xeioex@nginx.com>
date: Fri Oct 04 19:46:35 2019 +0300
description:
Increased maximum allowed recursion depth in parser and generator.

diffstat:

src/njs_generator.c | 2 +-
src/njs_parser.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diffs (24 lines):

diff -r 1cd7640472b8 -r 5c71fd61dc15 src/njs_generator.c
--- a/src/njs_generator.c Fri Oct 04 19:46:12 2019 +0300
+++ b/src/njs_generator.c Fri Oct 04 19:46:35 2019 +0300
@@ -513,7 +513,7 @@ njs_generator(njs_vm_t *vm, njs_generato
{
njs_int_t ret;

- if (njs_slow_path(generator->count++ > 1024)) {
+ if (njs_slow_path(generator->count++ > 4096)) {
njs_range_error(vm, "Maximum call stack size exceeded");
return NJS_ERROR;
}
diff -r 1cd7640472b8 -r 5c71fd61dc15 src/njs_parser.h
--- a/src/njs_parser.h Fri Oct 04 19:46:12 2019 +0300
+++ b/src/njs_parser.h Fri Oct 04 19:46:35 2019 +0300
@@ -116,7 +116,7 @@ void njs_parser_node_error(njs_vm_t *vm,

#define njs_parser_enter(vm, parser) \
do { \
- if (njs_slow_path((parser)->count++ > 1024)) { \
+ if (njs_slow_path((parser)->count++ > 4096)) { \
njs_range_error(vm, "Maximum call stack size exceeded"); \
return NJS_TOKEN_ERROR; \
} \
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[njs] Increased maximum allowed recursion depth in parser and generator.

Dmitry Volyntsev 83 October 04, 2019 12:52PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 96
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready