diff options
author | David Bürgin <676c7473@gmail.com> | 2015-03-30 15:06:37 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2015-04-02 01:22:02 -0400 |
commit | b3f07b2468edb02a3104082f6e9730f2c9221c19 (patch) | |
tree | c9a15e8bb17dcefd95645b439dbfd61818d15065 | |
parent | 119a3f2485e057b05ca46fc40e59f1434913d488 (diff) | |
download | rneovim-b3f07b2468edb02a3104082f6e9730f2c9221c19.tar.gz rneovim-b3f07b2468edb02a3104082f6e9730f2c9221c19.tar.bz2 rneovim-b3f07b2468edb02a3104082f6e9730f2c9221c19.zip |
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
-rw-r--r-- | src/nvim/option.c | 3 | ||||
-rw-r--r-- | src/nvim/version.c | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c index 4f955fee4e..2d016d8350 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -5354,6 +5354,9 @@ set_num_option ( if (p_hi < 0) { errmsg = e_positive; p_hi = 0; + } else if (p_hi > 10000) { + errmsg = e_invarg; + p_hi = 10000; } if (p_re < 0 || p_re > 2) { errmsg = e_invarg; diff --git a/src/nvim/version.c b/src/nvim/version.c index 25fa8a3ed6..8cdc06dba5 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -404,7 +404,7 @@ static int included_patches[] = { 339, 338, 337, - //336, + 336, 335, 334, //333 NA |