aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-07-25 01:41:42 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-07-25 02:04:32 -0400
commita77e5b3606bd40e524e5e3ab428b58ca2b3f0ac2 (patch)
treefd824c7e7fdce57e74df221f467b1bab189043fc /src/nvim/testdir
parent8e490b98ccad1aa701d88d5aba41bf7f8698be91 (diff)
downloadrneovim-a77e5b3606bd40e524e5e3ab428b58ca2b3f0ac2.tar.gz
rneovim-a77e5b3606bd40e524e5e3ab428b58ca2b3f0ac2.tar.bz2
rneovim-a77e5b3606bd40e524e5e3ab428b58ca2b3f0ac2.zip
vim-patch:8.1.0905: complicated regexp causes a crash
Problem: Complicated regexp causes a crash. (Kuang-che Wu) Solution: Limit the recursiveness of addstate(). (closes vim/vim#3941) https://github.com/vim/vim/commit/5567ad48b66dff13670af52a48509059acc34dfe
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_regexp_latin.vim6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_regexp_latin.vim b/src/nvim/testdir/test_regexp_latin.vim
index de209fa9ec..5fb6e78baa 100644
--- a/src/nvim/testdir/test_regexp_latin.vim
+++ b/src/nvim/testdir/test_regexp_latin.vim
@@ -85,3 +85,9 @@ func Test_multi_failure()
call assert_fails('/a\{a}', 'E870:')
set re=0
endfunc
+
+func Test_recursive_addstate()
+ " This will call addstate() recursively until it runs into the limit.
+ let lnum = search('\v((){328}){389}')
+ call assert_equal(0, lnum)
+endfunc