From 807c6bb909806b5abc3e46a9677bedfdddf2a7f0 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 27 Oct 2022 11:40:38 +0800 Subject: vim-patch:8.2.4206: condition with many "(" causes a crash Problem: Condition with many "(" causes a crash. Solution: Limit recursion to 1000. https://github.com/vim/vim/commit/fe6fb267e6ee5c5da2f41889e4e0e0ac5bf4b89d Co-authored-by: Bram Moolenaar --- src/nvim/testdir/test_eval_stuff.vim | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_eval_stuff.vim b/src/nvim/testdir/test_eval_stuff.vim index 5c60b64c22..851048ec5b 100644 --- a/src/nvim/testdir/test_eval_stuff.vim +++ b/src/nvim/testdir/test_eval_stuff.vim @@ -367,6 +367,11 @@ 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 + " K_SPECIAL in the modified character used be escaped, which causes " double-escaping with feedkeys() or as the return value of an mapping, " and doesn't match what getchar() returns, -- cgit