diff options
author | zeertzjq <zeertzjq@outlook.com> | 2025-02-22 07:32:40 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2025-03-27 07:26:42 +0800 |
commit | 30293575204bc6b1cdc8a7e06af2710921d46da2 (patch) | |
tree | ecbb19e2a0613fda10f78363d2a6d95bb2697013 /runtime/lua/vim/lsp/client.lua | |
parent | c17caca9b7a5e11c1262a0d8409075d9168980d3 (diff) | |
download | rneovim-30293575204bc6b1cdc8a7e06af2710921d46da2.tar.gz rneovim-30293575204bc6b1cdc8a7e06af2710921d46da2.tar.bz2 rneovim-30293575204bc6b1cdc8a7e06af2710921d46da2.zip |
vim-patch:9.1.1131: potential out-of-memory issue in search.c
Problem: potential out-of-memory issue in search.c
Solution: improve situation and refactor search.c slightly
(John Marriott)
- In function update_search_stat():
add a check for a theoretical null pointer reference, set and remember
the length of lastpat, remove the three calls to STRLEN() and use the
various string's associated lengths instead, add a check for an
out-of-memory condition.
- In function search_for_fuzz_match():
remove a call to strnsave() and thus avoid having to add a check for
an out-of-memory condition, also replace the call to STRLEN() by
ml_get_buf_len().
closes: vim/vim#16689
https://github.com/vim/vim/commit/b79fa3d9c8a08f15267797511d779e33bd33e68e
Co-authored-by: John Marriott <basilisk@internode.on.net>
Diffstat (limited to 'runtime/lua/vim/lsp/client.lua')
0 files changed, 0 insertions, 0 deletions