Skip to content

Commit 0e19fc0

Browse files
committed
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.
1 parent dc1c981 commit 0e19fc0

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

src/screen.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2123,7 +2123,11 @@ win_update(win_T *wp)
21232123

21242124
wp->w_lines[idx].wl_lnum = lnum;
21252125
wp->w_lines[idx].wl_valid = TRUE;
2126-
if (row > wp->w_height) /* past end of screen */
2126+
2127+
/* Past end of the window or end of the screen. Note that after
2128+
* resizing wp->w_height may be end up too big. That's a problem
2129+
* elsewhere, but prevent a crash here. */
2130+
if (row > wp->w_height || row + wp->w_winrow >= Rows)
21272131
{
21282132
/* we may need the size of that too long line later on */
21292133
if (dollar_vcol == -1)

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -761,6 +761,8 @@ static char *(features[]) =
761761

762762
static int included_patches[] =
763763
{ /* Add new patch number below this line */
764+
/**/
765+
1228,
764766
/**/
765767
1227,
766768
/**/

0 commit comments

Comments
 (0)