# HG changeset patch # User Bram Moolenaar # Date 1559592905 -7200 # Node ID 66a94fd8e37d8b2c776f6c30cccb68ffbf3c5aa5 # Parent 1d61668fb2481beedd0499aaa453316cec33c603 patch 8.1.1458: crash when using gtags commit https://github.com/vim/vim/commit/0b4c9eddb5752d46b65d16e42230b1228f230f40 Author: Bram Moolenaar Date: Mon Jun 3 22:04:23 2019 +0200 patch 8.1.1458: crash when using gtags Problem: Crash when using gtags. (issue https://github.com/vim/vim/issues/4102) Solution: Check for negative row or col in screen_puts_len(). (Christian Brabandt) diff --git a/src/screen.c b/src/screen.c --- a/src/screen.c +++ b/src/screen.c @@ -7707,7 +7707,11 @@ screen_puts_len( 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; diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -768,6 +768,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1458, +/**/ 1457, /**/ 1456,