diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-02-19 06:53:13 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-19 06:53:13 +0800 |
commit | 8f1f2a1d9f6af56ae928f6cdc29055a0ba13baea (patch) | |
tree | 8f1e162263020e6ee90864e74d6777cb2ed1bb11 /src/nvim | |
parent | 1c520053a9bf89004f1e5af9b31d3239341d7488 (diff) | |
download | rneovim-8f1f2a1d9f6af56ae928f6cdc29055a0ba13baea.tar.gz rneovim-8f1f2a1d9f6af56ae928f6cdc29055a0ba13baea.tar.bz2 rneovim-8f1f2a1d9f6af56ae928f6cdc29055a0ba13baea.zip |
vim-patch:9.1.0115: Using freed memory with full tag stack and user data (#27525)
Problem: Using freed memory with full tag stack and user data
(Konstantin Khlebnikov)
Solution: Clear the user data pointer of the newest entry.
(zeertzjq, Konstantin Khlebnikov)
fixes: neovim/neovim#27498
closes: vim/vim#14053
https://github.com/vim/vim/commit/c86bff1771ed9c340f8f4433ae5530fd6de97980
Cherry-pick Test_tag_stack() changes from patch 9.0.0767.
Co-authored-by: Konstantin Khlebnikov <koct9i@gmail.com>
Diffstat (limited to 'src/nvim')
-rw-r--r-- | src/nvim/tag.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/tag.c b/src/nvim/tag.c index 19aabb3aba..ab5bfc6773 100644 --- a/src/nvim/tag.c +++ b/src/nvim/tag.c @@ -388,7 +388,7 @@ void do_tag(char *tag, int type, int count, int forceit, bool verbose) for (int i = 1; i < tagstacklen; i++) { tagstack[i - 1] = tagstack[i]; } - tagstackidx--; + tagstack[--tagstackidx].user_data = NULL; } // put the tag name in the tag stack |