mirror of
https://github.com/vim/vim.git
synced 2025-10-22 08:34:29 -04:00
patch 9.1.1751: potential buffer-overflow in find_pattern_in_path()
Problem: potential buffer-overflow in find_pattern_in_path() Problem: Verify ptr p has enough room before adding ins_compl_len() fixes: #18195 closes: #18249 Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
@@ -3795,7 +3795,7 @@ search_line:
|
||||
break;
|
||||
found = TRUE;
|
||||
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))
|
||||
|
@@ -724,6 +724,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
1751,
|
||||
/**/
|
||||
1750,
|
||||
/**/
|
||||
|
Reference in New Issue
Block a user