diff options
author | Jurica Bradaric <jbradaric@gmail.com> | 2017-07-16 17:39:53 +0200 |
---|---|---|
committer | Jurica Bradaric <jbradaric@gmail.com> | 2017-07-16 17:48:50 +0200 |
commit | e29ec131d67f3410dba85ab13ba4c617e5768269 (patch) | |
tree | 2f7881384c2ba2cb28006eb3fc5014f89fb259ea /src/nvim/testdir/test_quickfix.vim | |
parent | 875c356a83b07573b87b2995478fc3b0703bc023 (diff) | |
download | rneovim-e29ec131d67f3410dba85ab13ba4c617e5768269.tar.gz rneovim-e29ec131d67f3410dba85ab13ba4c617e5768269.tar.bz2 rneovim-e29ec131d67f3410dba85ab13ba4c617e5768269.zip |
vim-patch:8.0.0084
Problem: Using freed memory when adding to a quickfix list. (Domenique
Pelle)
Solution: Clear the directory name.
https://github.com/vim/vim/commit/7618e00d3b8bfe064cfc524640d754607361f9df
Diffstat (limited to 'src/nvim/testdir/test_quickfix.vim')
-rw-r--r-- | src/nvim/testdir/test_quickfix.vim | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_quickfix.vim b/src/nvim/testdir/test_quickfix.vim index 08a749f65e..aff5fc2eed 100644 --- a/src/nvim/testdir/test_quickfix.vim +++ b/src/nvim/testdir/test_quickfix.vim @@ -1651,3 +1651,25 @@ func Test_caddexpr_wrong() call assert_fails('caddexpr ""', 'E376:') let &efm = save_efm endfunc + +func Test_dirstack_cleanup() + " This used to cause a memory access in freed memory. + let save_efm = &efm + lexpr '0' + lopen + fun X(c) + let save_efm=&efm + set efm=%D%f + if a:c == 'c' + caddexpr '::' + else + laddexpr ':0:0' + endif + let &efm=save_efm + endfun + call X('c') + call X('l') + call setqflist([], 'r') + caddbuffer + let &efm = save_efm +endfunc |