comparison src/terminal.c @ 18162:9c3347b21b89 v8.1.2076

patch 8.1.2076: crash when trying to put a terminal in a popup window Commit: https://github.com/vim/vim/commit/e0d749a49630778d45642d7589a3703697746760 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Sep 25 22:14:48 2019 +0200 patch 8.1.2076: crash when trying to put a terminal in a popup window Problem: Crash when trying to put a terminal buffer in a popup window. Solution: Check for NULL buffer. Do not allow putting a terminal in a popup window.
author Bram Moolenaar <Bram@vim.org>
date Wed, 25 Sep 2019 22:15:03 +0200
parents 59bc3cd42cf5
children 4ac8161e92e0
comparison
equal deleted inserted replaced
18161:94e3c1e4d5ae 18162:9c3347b21b89
3345 { 3345 {
3346 newrows = MIN(newrows, twp->w_height); 3346 newrows = MIN(newrows, twp->w_height);
3347 newcols = MIN(newcols, twp->w_width); 3347 newcols = MIN(newcols, twp->w_width);
3348 } 3348 }
3349 } 3349 }
3350 if (newrows == 99999 || newcols == 99999)
3351 return; // safety exit
3350 newrows = rows == 0 ? newrows : minsize ? MAX(rows, newrows) : rows; 3352 newrows = rows == 0 ? newrows : minsize ? MAX(rows, newrows) : rows;
3351 newcols = cols == 0 ? newcols : minsize ? MAX(cols, newcols) : cols; 3353 newcols = cols == 0 ? newcols : minsize ? MAX(cols, newcols) : cols;
3352 3354
3353 if (term->tl_rows != newrows || term->tl_cols != newcols) 3355 if (term->tl_rows != newrows || term->tl_cols != newcols)
3354 { 3356 {