diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2022-05-18 08:21:24 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-05-18 08:21:24 +0800 |
| commit | 7ded303d684605ea44846c5f8a4031326529fb6d (patch) | |
| tree | 0db0e34b5f4a55aa68a43e273e0674489566932d /src/nvim/testdir | |
| parent | 38cbca3eeadca86f1431ea7a97f498f6a9cd33c8 (diff) | |
| download | rneovim-7ded303d684605ea44846c5f8a4031326529fb6d.tar.gz rneovim-7ded303d684605ea44846c5f8a4031326529fb6d.tar.bz2 rneovim-7ded303d684605ea44846c5f8a4031326529fb6d.zip | |
vim-patch:8.2.4975: recursive command line loop may cause a crash (#18614)
Problem: Recursive command line loop may cause a crash.
Solution: Limit recursion of getcmdline().
https://github.com/vim/vim/commit/51f0bfb88a3554ca2dde777d78a59880d1ee37a8
Cherry-pick e_command_too_recursive from patch 8.2.3957.
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_cmdline.vim | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_cmdline.vim b/src/nvim/testdir/test_cmdline.vim index 759caac878..b2c752376f 100644 --- a/src/nvim/testdir/test_cmdline.vim +++ b/src/nvim/testdir/test_cmdline.vim @@ -1224,4 +1224,16 @@ func Test_screenpos_and_completion() call feedkeys(":let a\<C-R>=Check_completion()\<CR>\<Esc>", "xt") endfunc +func Test_recursive_register() + let @= = '' + silent! ?e/ + let caught = 'no' + try + normal // + catch /E169:/ + let caught = 'yes' + endtry + call assert_equal('yes', caught) +endfunc + " vim: shiftwidth=2 sts=2 expandtab |