vim-patch:7.4.336 #2299

Problem:    Setting 'history' to a big value causes out-of-memory errors.
Solution:   Limit the value to 10000. (Hirohito Higashi)

https://github.com/vim/vim/tree/v7-4-336
This commit is contained in:
David Bürgin 2015-03-30 15:06:37 +02:00 committed by Justin M. Keyes
parent 119a3f2485
commit b3f07b2468
2 changed files with 4 additions and 1 deletions

View File

@ -5354,6 +5354,9 @@ set_num_option (
if (p_hi < 0) { if (p_hi < 0) {
errmsg = e_positive; errmsg = e_positive;
p_hi = 0; p_hi = 0;
} else if (p_hi > 10000) {
errmsg = e_invarg;
p_hi = 10000;
} }
if (p_re < 0 || p_re > 2) { if (p_re < 0 || p_re > 2) {
errmsg = e_invarg; errmsg = e_invarg;

View File

@ -404,7 +404,7 @@ static int included_patches[] = {
339, 339,
338, 338,
337, 337,
//336, 336,
335, 335,
334, 334,
//333 NA //333 NA