mirror of
https://github.com/neovim/neovim.git
synced 2024-12-24 21:25:04 -07:00
vim-patch:8.1.1458: crash when using gtags #10704
Problem: Crash when using gtags. (issue vim/vim#4102)
Solution: Check for negative row or col in screen_puts_len(). (Christian
Brabandt)
0b4c9eddb5
This commit is contained in:
parent
06d9cc734b
commit
43a8242cd5
@ -5372,8 +5372,11 @@ void grid_puts_len(ScreenGrid *grid, char_u *text, int textlen, int row,
|
||||
|
||||
screen_adjust_grid(&grid, &row, &col);
|
||||
|
||||
// safety check
|
||||
if (grid->chars == NULL || row >= grid->Rows || col >= grid->Columns) {
|
||||
// Safety check. The check for negative row and column is to fix issue
|
||||
// vim/vim#4102. TODO: find out why row/col could be negative.
|
||||
if (grid->chars == NULL
|
||||
|| row >= grid->Rows || row < 0
|
||||
|| col >= grid->Columns || col < 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user