]> git.ipfire.org Git - thirdparty/vim.git/commit
patch 9.2.0815: deeply nested regexp patterns may cause stack overflow v9.2.0815
authorlipengyu <lipengyu@kylinos.cn>
Mon, 20 Jul 2026 16:55:55 +0000 (16:55 +0000)
committerChristian Brabandt <cb@256bit.org>
Mon, 20 Jul 2026 16:55:55 +0000 (16:55 +0000)
commita79cd6bfc3e85e1d9f1ec48eda76c7385b44bf69
treebebc10b41fd9a94b823e043859192ee134dfdb71
parentcf80f134e95ead988b875e8c21813104f2575390
patch 9.2.0815: deeply nested regexp patterns may cause stack overflow

Problem:  Deeply nested regexp groups can cause uncontrolled recursion
          in the regexp compiler and exhaust the C stack.
Solution: Limit recursive regexp parsing depth in both the backtracking
          and NFA compilers (lipengyu)

closes: #20731

Signed-off-by: lipengyu <lipengyu@kylinos.cn>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/regexp.c
src/regexp_bt.c
src/regexp_nfa.c
src/testdir/test_regexp_latin.vim
src/version.c