1
0
forked from aniani/vim

patch 8.2.4206: condition with many "(" causes a crash

Problem:    Condition with many "(" causes a crash.
Solution:   Limit recursion to 1000.
This commit is contained in:
Bram Moolenaar
2022-01-24 18:16:12 +00:00
parent 4663435074
commit fe6fb267e6
4 changed files with 25 additions and 1 deletions

View File

@@ -590,4 +590,9 @@ func Test_curly_assignment()
unlet g:gvar
endfunc
func Test_deep_recursion()
" this was running out of stack
call assert_fails("exe 'if ' .. repeat('(', 1002)", 'E1169: Expression too recursive: ((')
endfunc
" vim: shiftwidth=2 sts=2 expandtab