diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2022-11-05 16:59:07 +0800 |
|---|---|---|
| committer | zeertzjq <zeertzjq@outlook.com> | 2022-11-07 08:24:48 +0800 |
| commit | 595f7f37a98f3af12fe94ba4332b8f33004b7e4b (patch) | |
| tree | 76abc9a686a07ef37d146139425345a4a0a0a05b /src/nvim/testdir | |
| parent | 1e4adf4b56cb7a360d16c4d04290c50ae7e80fbc (diff) | |
| download | rneovim-595f7f37a98f3af12fe94ba4332b8f33004b7e4b.tar.gz rneovim-595f7f37a98f3af12fe94ba4332b8f33004b7e4b.tar.bz2 rneovim-595f7f37a98f3af12fe94ba4332b8f33004b7e4b.zip | |
vim-patch:9.0.0246: using freed memory when 'tagfunc' deletes the buffer
Problem: Using freed memory when 'tagfunc' deletes the buffer.
Solution: Make a copy of the tag name.
https://github.com/vim/vim/commit/adce965162dd89bf29ee0e5baf53652e7515762c
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_tagfunc.vim | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_tagfunc.vim b/src/nvim/testdir/test_tagfunc.vim index e3085b9395..ad761f1b23 100644 --- a/src/nvim/testdir/test_tagfunc.vim +++ b/src/nvim/testdir/test_tagfunc.vim @@ -273,4 +273,16 @@ func Test_tagfunc_callback() %bw! endfunc +func Test_tagfunc_wipes_buffer() + func g:Tag0unc0(t,f,o) + bwipe + endfunc + set tagfunc=g:Tag0unc0 + new + cal assert_fails('tag 0', 'E987:') + + delfunc g:Tag0unc0 + set tagfunc= +endfunc + " vim: shiftwidth=2 sts=2 expandtab |