mirror of
https://github.com/neovim/neovim.git
synced 2025-09-15 15:58:17 +00:00
vim-patch:9.1.1751: potential buffer-overflow in find_pattern_in_path() (#35705)
Problem: potential buffer-overflow in find_pattern_in_path()
Problem: Verify ptr p has enough room before adding ins_compl_len()
fixes: vim/vim#18195
closes: vim/vim#18249
21ecb0d2e2
Co-authored-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
@@ -3253,7 +3253,7 @@ search_line:
|
||||
}
|
||||
found = true;
|
||||
char *aux = p = startp;
|
||||
if (compl_status_adding()) {
|
||||
if (compl_status_adding() && (int)strlen(p) >= ins_compl_len()) {
|
||||
p += ins_compl_len();
|
||||
if (vim_iswordp(p)) {
|
||||
goto exit_matched;
|
||||
|
Reference in New Issue
Block a user