diff options
author | James McCoy <jamessan@jamessan.com> | 2016-11-12 14:18:29 -0500 |
---|---|---|
committer | James McCoy <jamessan@jamessan.com> | 2016-11-15 23:16:08 -0500 |
commit | caa33aaaf8b044cf3a8311213d0841d2d9e591a5 (patch) | |
tree | 824235f97311c4465105099577af9af5c565dd78 /test/functional/legacy/quickfix_spec.lua | |
parent | c0fd830be4ef3eafb756c463aee6408323ba4e58 (diff) | |
download | rneovim-caa33aaaf8b044cf3a8311213d0841d2d9e591a5.tar.gz rneovim-caa33aaaf8b044cf3a8311213d0841d2d9e591a5.tar.bz2 rneovim-caa33aaaf8b044cf3a8311213d0841d2d9e591a5.zip |
vim-patch:7.4.1647
Problem: Using freed memory after setqflist() and ":caddbuffer". (Dominique)
Solution: Set qf_ptr when adding the first item to the quickfix list.
https://github.com/vim/vim/commit/8b20179c657b4266dff115486ca68c6a50324071
Diffstat (limited to 'test/functional/legacy/quickfix_spec.lua')
-rw-r--r-- | test/functional/legacy/quickfix_spec.lua | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/functional/legacy/quickfix_spec.lua b/test/functional/legacy/quickfix_spec.lua index 480e046f55..fa9ddc78ae 100644 --- a/test/functional/legacy/quickfix_spec.lua +++ b/test/functional/legacy/quickfix_spec.lua @@ -443,6 +443,17 @@ describe('helpgrep', function() augroup! testgroup endfunc + + func Test_caddbuffer_to_empty() + helpgr quickfix + call setqflist([], 'r') + cad + call assert_fails('cn', 'E553:') + " Upstream calls quit! here to verify vim is still + " running, but that will be covered by the + " expected_empty() call in the busted test + " quit! + endfunc ]]) end) @@ -522,6 +533,11 @@ describe('helpgrep', function() call('XquickfixChangedByAutocmd', 'l') expected_empty() end) + + it('does not crash after using caddbuffer with an empty qf list', function() + call('Test_caddbuffer_to_empty') + expected_empty() + end) end) describe('errorformat', function() |