summaryrefslogtreecommitdiffstats
path: root/src/option.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2013-06-30 17:51:51 +0200
committerBram Moolenaar <Bram@vim.org>2013-06-30 17:51:51 +0200
commite057d40d967a8223a34fe5b56ffb00dfd06e4cd4 (patch)
tree3c14b2bf97d6bb23721a33dfba7704b5fa91f6b5 /src/option.c
parent5a4d51e6929b1bb615eaf212a091384cc266b8d7 (diff)
updated for version 7.3.1278v7.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.c6
1 files changed, 1 insertions, 5 deletions
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' */