mirror of
https://github.com/vim/vim.git
synced 2025-10-23 08:44:20 -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;
|
break;
|
||||||
found = TRUE;
|
found = TRUE;
|
||||||
aux = p = startp;
|
aux = p = startp;
|
||||||
if (compl_status_adding())
|
if (compl_status_adding() && (int)STRLEN(p) >= ins_compl_len())
|
||||||
{
|
{
|
||||||
p += ins_compl_len();
|
p += ins_compl_len();
|
||||||
if (vim_iswordp(p))
|
if (vim_iswordp(p))
|
||||||
|
@@ -724,6 +724,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1751,
|
||||||
/**/
|
/**/
|
||||||
1750,
|
1750,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user