]> git.kaiwu.me - njs.git/commit
Fixed RegExp.prototype.exec() when second argument is absent.
authorDmitry Volyntsev <xeioex@nginx.com>
Tue, 9 Jan 2024 00:40:42 +0000 (16:40 -0800)
committerDmitry Volyntsev <xeioex@nginx.com>
Tue, 9 Jan 2024 00:40:42 +0000 (16:40 -0800)
commit5541631336af0ba757888fc16a919ddaa0f38f12
tree48336d3bb9f9a031e5e81311025f03912fa177b3
parentb668b27356f8c6b14cc93f186bd1fbb69af3b072
Fixed RegExp.prototype.exec() when second argument is absent.

Previously, when the second argument is undefined, NaN is casted to
unsigned which is undefined behavior.

Found by UndefinedBehaviorSanitizer.
src/njs_regexp.c