mirror of
https://github.com/neovim/neovim.git
synced 2026-05-09 09:49:49 -04: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 https://github.com/vim/vim/commit/21ecb0d2e2888ded9da04c4f47758cec99063822 Co-authored-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
+1
-1
@@ -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