diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-02-13 20:31:50 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-02-13 20:31:50 +0100 |
commit | 15bbd6ec871a0efdd16256e1fccbaac0fd374cbd (patch) | |
tree | ba3e29a16f4c4f152b5da32efc65d264c104fb86 /src/testdir/test_regexp_latin.vim | |
parent | d9ef1b8d77f304c83241f807c17ffa26c9033778 (diff) | |
download | vim-git-15bbd6ec871a0efdd16256e1fccbaac0fd374cbd.tar.gz |
patch 8.1.0910: crash with tricky search patternv8.1.0910
Problem: Crash with tricky search pattern. (Kuang-che Wu)
Solution: Check for runnning out of memory. (closes #3950)
Diffstat (limited to 'src/testdir/test_regexp_latin.vim')
-rw-r--r-- | src/testdir/test_regexp_latin.vim | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/testdir/test_regexp_latin.vim b/src/testdir/test_regexp_latin.vim index 415a2764f..bcac6c72c 100644 --- a/src/testdir/test_regexp_latin.vim +++ b/src/testdir/test_regexp_latin.vim @@ -90,3 +90,10 @@ func Test_recursive_addstate() let lnum = search('\v((){328}){389}') call assert_equal(0, lnum) endfunc + +func Test_out_of_memory() + new + s/^/,n + " This will be slow... + call assert_fails('call search("\\v((n||<)+);")', 'E363:') +endfunc |