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:
@@ -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' */
|
||||
|
Reference in New Issue
Block a user