Permalink
Browse files

patch 8.0.1228: invalid memory access in GUI test

Problem:    Invalid memory access in GUI test.
Solution:   Check that the row is not outside of the screen.
  • Loading branch information...
brammool committed Oct 28, 2017
1 parent dc1c981 commit 0e19fc07e73214f94441cb3a495504a1de21eb07
Showing with 7 additions and 1 deletion.
  1. +5 −1 src/screen.c
  2. +2 −0 src/version.c
View
@@ -2123,7 +2123,11 @@ win_update(win_T *wp)
wp->w_lines[idx].wl_lnum = lnum;
wp->w_lines[idx].wl_valid = TRUE;
if (row > wp->w_height) /* past end of screen */
/* Past end of the window or end of the screen. Note that after
* resizing wp->w_height may be end up too big. That's a problem
* elsewhere, but prevent a crash here. */
if (row > wp->w_height || row + wp->w_winrow >= Rows)
{
/* we may need the size of that too long line later on */
if (dollar_vcol == -1)
View
@@ -761,6 +761,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1228,
/**/
1227,
/**/

0 comments on commit 0e19fc0

Please sign in to comment.