From e057d40d967a8223a34fe5b56ffb00dfd06e4cd4 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 30 Jun 2013 17:51:51 +0200 Subject: updated for version 7.3.1278 Problem: When someone sets the screen size to a huge value with "stty" Vim runs out of memory before reducing the size. Solution: Limit Rows and Columns in more places. --- src/option.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/option.c') diff --git a/src/option.c b/src/option.c index d0e55a9549..8911b015ae 100644 --- a/src/option.c +++ b/src/option.c @@ -8528,11 +8528,7 @@ set_num_option(opt_idx, varp, value, errbuf, errbuflen, opt_flags) } Columns = MIN_COLUMNS; } - /* Limit the values to avoid an overflow in Rows * Columns. */ - if (Columns > 10000) - Columns = 10000; - if (Rows > 1000) - Rows = 1000; + limit_screen_size(); #ifdef DJGPP /* avoid a crash by checking for a too large value of 'columns' */ -- cgit v1.2.3