diff 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
line wrap: on
line diff
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -3347,6 +3347,8 @@ term_update_window(win_T *wp)
 	    newcols = MIN(newcols, twp->w_width);
 	}
     }
+    if (newrows == 99999 || newcols == 99999)
+	return; // safety exit
     newrows = rows == 0 ? newrows : minsize ? MAX(rows, newrows) : rows;
     newcols = cols == 0 ? newcols : minsize ? MAX(cols, newcols) : cols;