]> git.kaiwu.me - njs.git/commit
Fixed RegExpBuiltinExec() with global flag and byte-strings.
authorDmitry Volyntsev <xeioex@nginx.com>
Tue, 1 Sep 2020 17:25:33 +0000 (17:25 +0000)
committerDmitry Volyntsev <xeioex@nginx.com>
Tue, 1 Sep 2020 17:25:33 +0000 (17:25 +0000)
commit37de9d66c7a7a1b184a52f5a8fe6a0f700c351f8
tree1e44864f92092fbf01e4de03df3cf44b9d3dba33
parent3b907e75436637cb925ed1de32014b58f3a0be14
Fixed RegExpBuiltinExec() with global flag and byte-strings.

The issue was introduced in f9082cd59ba6 (0.4.2).  Since 1c729f765cfb
(0.4.2) RegExp.prototype[Symbol.replace] with a regexp with the global
flag may result in an endless loop for byte-strings with broken UTF8
encoding.
src/njs_regexp.c
src/test/njs_unit_test.c