diff options
author | Florian Larysch <fl@n621.de> | 2016-10-08 17:55:55 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2016-10-26 13:05:25 +0200 |
commit | 2a6c5bb0c4b03a9da81dae64d37c9912e448eaf0 (patch) | |
tree | 0fd9119bf18da9f765ae85b01747a853f2f8906b /runtime | |
parent | 0f32088ea23fbbe9557c89a9e075f2e9b9e158a4 (diff) | |
download | rneovim-2a6c5bb0c4b03a9da81dae64d37c9912e448eaf0.tar.gz rneovim-2a6c5bb0c4b03a9da81dae64d37c9912e448eaf0.tar.bz2 rneovim-2a6c5bb0c4b03a9da81dae64d37c9912e448eaf0.zip |
modeline: Handle version number overflow. #5450
Closes #5449
A file containing the string "vim" followed by a very large number in a modeline
location will trigger an overflow in getdigits() which is called by
chk_modeline() when trying to parse the version number.
Add getdigits_safe(), which does not assert overflows, but reports them to the
caller.
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/options.txt | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index fd2d5232ac..5a5999e64c 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -497,6 +497,7 @@ For example, to use a modeline only for Vim 7.0: To use a modeline for Vim after version 7.2: /* vim>702: set cole=2: */ ~ There can be no blanks between "vim" and the ":". +The modeline is ignored if {vers} does not fit in an integer. {Nvim} The number of lines that are checked can be set with the 'modelines' option. |