diff options
author | Bram Moolenaar <Bram@vim.org> | 2013-06-30 17:51:51 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2013-06-30 17:51:51 +0200 |
commit | e057d40d967a8223a34fe5b56ffb00dfd06e4cd4 (patch) | |
tree | 3c14b2bf97d6bb23721a33dfba7704b5fa91f6b5 /src/option.c | |
parent | 5a4d51e6929b1bb615eaf212a091384cc266b8d7 (diff) | |
download | vim-e057d40d967a8223a34fe5b56ffb00dfd06e4cd4.zip |
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.
Diffstat (limited to 'src/option.c')
-rw-r--r-- | src/option.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/option.c b/src/option.c index d0e55a954..8911b015a 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' */ |