diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2019-04-16 23:57:12 -0400 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2019-04-23 00:03:48 -0400 |
commit | 37c7c964aef5f0d47c0bd0fb8abb15a5407e4b27 (patch) | |
tree | 8239e6e2713ba6e88a6451d75c84031e9c488ed9 | |
parent | 439bbe00ece4c2f50fec453fc9b3c92d075b2431 (diff) | |
download | rneovim-37c7c964aef5f0d47c0bd0fb8abb15a5407e4b27.tar.gz rneovim-37c7c964aef5f0d47c0bd0fb8abb15a5407e4b27.tar.bz2 rneovim-37c7c964aef5f0d47c0bd0fb8abb15a5407e4b27.zip |
vim-patch:8.0.1408: crash in setqflist()
Problem: Crash in setqflist().
Solution: Check for string to be NULL. (Dominique Pelle, closes vim/vim#2464)
https://github.com/vim/vim/commit/a0ca7d002d4efcf4bce0af6943146a339677ed3d
-rw-r--r-- | src/nvim/testdir/test_quickfix.vim | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_quickfix.vim b/src/nvim/testdir/test_quickfix.vim index f50f33d255..ad4661eb3c 100644 --- a/src/nvim/testdir/test_quickfix.vim +++ b/src/nvim/testdir/test_quickfix.vim @@ -1379,6 +1379,11 @@ func XquickfixSetListWithAct(cchar) call assert_fails("call g:Xsetlist(list1, 0)", 'E928:') endfunc +func Test_setqflist_invalid_nr() + " The following command used to crash Vim + call setqflist([], ' ', {'nr' : $XXX_DOES_NOT_EXIST}) +endfunc + func Test_quickfix_set_list_with_act() call XquickfixSetListWithAct('c') call XquickfixSetListWithAct('l') @@ -2649,6 +2654,15 @@ func Test_qf_id() call Xqfid_tests('l') endfunc +func Test_getqflist_invalid_nr() + " The following commands used to crash Vim + cexpr "" + call getqflist({'nr' : $XXX_DOES_NOT_EXIST_XXX}) + + " Cleanup + call setqflist([], 'r') +endfunc + " Test for shortening/simplifying the file name when opening the " quickfix window or when displaying the quickfix list func Test_shorten_fname() |