1
0
forked from aniani/vim

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.
This commit is contained in:
Bram Moolenaar
2013-06-30 17:51:51 +02:00
parent 5a4d51e692
commit e057d40d96
7 changed files with 24 additions and 8 deletions

View File

@@ -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' */