comparison src/libvterm/src/screen.c @ 20875:88cec48503b8 v8.2.0989

patch 8.2.0989: crash after resizing a terminal window Commit: https://github.com/vim/vim/commit/a6e8bf2d8929ef52eeda495e0e0c3d2bff8f5830 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Jun 16 20:58:07 2020 +0200 patch 8.2.0989: crash after resizing a terminal window Problem: Crash after resizing a terminal window. (August Masquelier) Solution: Add check for valid row in libvterm. (closes https://github.com/vim/vim/issues/6273)
author Bram Moolenaar <Bram@vim.org>
date Tue, 16 Jun 2020 21:00:05 +0200
parents a4652d7ec99f
children 2f2bc98a8dfb
comparison
equal deleted inserted replaced
20874:cc48460d0b8f 20875:88cec48503b8
278 const VTermLineInfo *info = vterm_state_get_lineinfo(screen->state, row); 278 const VTermLineInfo *info = vterm_state_get_lineinfo(screen->state, row);
279 279
280 for(col = rect.start_col; col < rect.end_col; col++) { 280 for(col = rect.start_col; col < rect.end_col; col++) {
281 ScreenCell *cell = getcell(screen, row, col); 281 ScreenCell *cell = getcell(screen, row, col);
282 282
283 if (cell == NULL)
284 {
285 DEBUG_LOG2("libvterm: erase_internal() position invalid: %d / %d",
286 row, col);
287 return 1;
288 }
283 if(selective && cell->pen.protected_cell) 289 if(selective && cell->pen.protected_cell)
284 continue; 290 continue;
285 291
286 cell->chars[0] = 0; 292 cell->chars[0] = 0;
287 cell->pen = screen->pen; 293 cell->pen = screen->pen;