Mercurial > vim
comparison src/testdir/test_options.vim @ 10962:6da4287fd735 v8.0.0370
patch 8.0.0370: invalid memory access when setting wildchar empty
commit https://github.com/vim/vim/commit/a12e40351d1357687e8b5dc3122fffef705bdc08
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Feb 25 21:37:57 2017 +0100
patch 8.0.0370: invalid memory access when setting wildchar empty
Problem: Invalid memory access when setting wildchar empty.
Solution: Avoid going over the end of the option value. (Dominique Pelle,
closes #1509) Make option test check all number options with
empty value.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 25 Feb 2017 21:45:04 +0100 |
parents | e5896de85dcf |
children | bbdb4f0134cb |
comparison
equal
deleted
inserted
replaced
10961:fb50279310e3 | 10962:6da4287fd735 |
---|---|
25 function! Test_isfname() | 25 function! Test_isfname() |
26 " This used to cause Vim to access uninitialized memory. | 26 " This used to cause Vim to access uninitialized memory. |
27 set isfname= | 27 set isfname= |
28 call assert_equal("~X", expand("~X")) | 28 call assert_equal("~X", expand("~X")) |
29 set isfname& | 29 set isfname& |
30 endfunction | |
31 | |
32 function Test_wildchar() | |
33 " Empty 'wildchar' used to access invalid memory. | |
34 call assert_fails('set wildchar=', 'E521:') | |
35 call assert_fails('set wildchar=abc', 'E521:') | |
36 set wildchar=<Esc> | |
37 let a=execute('set wildchar?') | |
38 call assert_equal("\n wildchar=<Esc>", a) | |
39 set wildchar=27 | |
40 let a=execute('set wildchar?') | |
41 call assert_equal("\n wildchar=<Esc>", a) | |
42 set wildchar& | |
30 endfunction | 43 endfunction |
31 | 44 |
32 function Test_options() | 45 function Test_options() |
33 let caught = 'ok' | 46 let caught = 'ok' |
34 try | 47 try |