From b3f07b2468edb02a3104082f6e9730f2c9221c19 Mon Sep 17 00:00:00 2001 From: David Bürgin <676c7473@gmail.com> Date: Mon, 30 Mar 2015 15:06:37 +0200 Subject: 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 --- src/nvim/option.c | 3 +++ src/nvim/version.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) 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 -- cgit