mirror of
https://github.com/vim/vim.git
synced 2025-09-28 04:24:06 -04:00
patch 8.1.1458: crash when using gtags
Problem: Crash when using gtags. (issue #4102) Solution: Check for negative row or col in screen_puts_len(). (Christian Brabandt)
This commit is contained in:
@@ -7707,7 +7707,11 @@ screen_puts_len(
|
|||||||
int force_redraw_next = FALSE;
|
int force_redraw_next = FALSE;
|
||||||
int need_redraw;
|
int need_redraw;
|
||||||
|
|
||||||
if (ScreenLines == NULL || row >= screen_Rows) /* safety check */
|
// Safety check. The check for negative row and column is to fix issue
|
||||||
|
// #4102. TODO: find out why row/col could be negative.
|
||||||
|
if (ScreenLines == NULL
|
||||||
|
|| row >= screen_Rows || row < 0
|
||||||
|
|| col >= screen_Columns || col < 0)
|
||||||
return;
|
return;
|
||||||
off = LineOffset[row] + col;
|
off = LineOffset[row] + col;
|
||||||
|
|
||||||
|
@@ -767,6 +767,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 */
|
||||||
|
/**/
|
||||||
|
1458,
|
||||||
/**/
|
/**/
|
||||||
1457,
|
1457,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user