0
0
mirror of https://github.com/vim/vim.git synced 2025-09-26 04:04:07 -04:00

patch 8.1.0910: crash with tricky search pattern

Problem:    Crash with tricky search pattern. (Kuang-che Wu)
Solution:   Check for runnning out of memory. (closes #3950)
This commit is contained in:
Bram Moolenaar
2019-02-13 20:31:50 +01:00
parent d9ef1b8d77
commit 15bbd6ec87
3 changed files with 25 additions and 8 deletions

View File

@@ -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