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:
@@ -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
|
||||
|
Reference in New Issue
Block a user