comparison src/screen.c @ 12700:306a7a357c71 v8.0.1228

patch 8.0.1228: invalid memory access in GUI test commit https://github.com/vim/vim/commit/0e19fc07e73214f94441cb3a495504a1de21eb07 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Oct 28 14:45:16 2017 +0200 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.
author Christian Brabandt <cb@256bit.org>
date Sat, 28 Oct 2017 15:00:05 +0200
parents 4e846c9d61a8
children 339681756948
comparison
equal deleted inserted replaced
12699:fe12aeafe2b3 12700:306a7a357c71
2121 #endif 2121 #endif
2122 } 2122 }
2123 2123
2124 wp->w_lines[idx].wl_lnum = lnum; 2124 wp->w_lines[idx].wl_lnum = lnum;
2125 wp->w_lines[idx].wl_valid = TRUE; 2125 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)
2127 { 2131 {
2128 /* we may need the size of that too long line later on */ 2132 /* we may need the size of that too long line later on */
2129 if (dollar_vcol == -1) 2133 if (dollar_vcol == -1)
2130 wp->w_lines[idx].wl_size = plines_win(wp, lnum, TRUE); 2134 wp->w_lines[idx].wl_size = plines_win(wp, lnum, TRUE);
2131 ++idx; 2135 ++idx;