From 2e5736e2cd4ef14ec23c1e0176fbcb17c9f55eba Mon Sep 17 00:00:00 2001 From: James McCoy Date: Sat, 12 Nov 2016 15:58:19 -0500 Subject: vim-patch:7.4.1664 Problem: Crash in :cgetexpr. Solution: Check for NULL pointer. (Dominique) Add a test. https://github.com/vim/vim/commit/89c64d557dbe0bacfdd7b2872411b00cc1523d85 --- test/functional/legacy/quickfix_spec.lua | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test') diff --git a/test/functional/legacy/quickfix_spec.lua b/test/functional/legacy/quickfix_spec.lua index 5e5aefc4e6..5787ff8ff3 100644 --- a/test/functional/legacy/quickfix_spec.lua +++ b/test/functional/legacy/quickfix_spec.lua @@ -540,6 +540,12 @@ describe('helpgrep', function() call('Test_caddbuffer_to_empty') expected_empty() end) + + it('cgetexpr does not crash with a NULL element in a list', function() + execute('cgetexpr [$x]') + -- Still alive? + eq(2, eval('1+1')) + end) end) describe('errorformat', function() -- cgit