Welcome! Log In Create A New Profile

Advanced

[njs] Removing possible ignored regexp compilation error.

Dmitry Volyntsev
May 30, 2019 07:20AM
details: https://hg.nginx.org/njs/rev/ab5d059e4ef8
branches:
changeset: 993:ab5d059e4ef8
user: Dmitry Volyntsev <xeioex@nginx.com>
date: Thu May 30 14:17:59 2019 +0300
description:
Removing possible ignored regexp compilation error.

diffstat:

njs/njs_regexp.c | 2 ++
njs/test/njs_unit_test.c | 3 +++
2 files changed, 5 insertions(+), 0 deletions(-)

diffs (25 lines):

diff -r 82ca4be8b357 -r ab5d059e4ef8 njs/njs_regexp.c
--- a/njs/njs_regexp.c Tue May 28 20:51:24 2019 +0300
+++ b/njs/njs_regexp.c Thu May 30 14:17:59 2019 +0300
@@ -557,6 +557,8 @@ njs_regexp_pattern_create(njs_vm_t *vm,
} while (n != pattern->ngroups);
}

+ njs_value_undefined_set(&vm->retval);
+
return pattern;

fail:
diff -r 82ca4be8b357 -r ab5d059e4ef8 njs/test/njs_unit_test.c
--- a/njs/test/njs_unit_test.c Tue May 28 20:51:24 2019 +0300
+++ b/njs/test/njs_unit_test.c Thu May 30 14:17:59 2019 +0300
@@ -7240,6 +7240,9 @@ static njs_unit_test_t njs_test[] =
{ nxt_string("/^[A-Za-z0-9+/]{4}$/.test('////')"),
nxt_string("true") },

+ { nxt_string("/[\\uFDE0-\\uFFFD]/g; export default 1"),
+ nxt_string("SyntaxError: Illegal export statement in 1") },
+
{ nxt_string("'[]!\"#$%&\\'()*+,.\\/:;<=>?@\\^_`{|}-'.split('')"
".every(ch=>/[\\]\\[!\"#$%&'()*+,.\\/:;<=>?@\\^_`{|}-]/.test(ch))"),
nxt_string("true") },
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[njs] Removing possible ignored regexp compilation error.

Dmitry Volyntsev 90 May 30, 2019 07:20AM



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

Online Users

Guests: 74
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