mirror of
https://github.com/vim/vim.git
synced 2025-09-29 04:34:16 -04:00
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 #3941)
This commit is contained in:
@@ -84,3 +84,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
|
||||
|
Reference in New Issue
Block a user