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)
diff --git a/src/screen.c b/src/screen.c
index 37999bb..53343e8 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -7707,7 +7707,11 @@
int force_redraw_next = FALSE;
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;
off = LineOffset[row] + col;