Mercurial > vim
diff src/testdir/test_options.vim @ 28455:8f4f16efeeb3 v8.2.4752
patch 8.2.4752: wrong 'statusline' value can cause illegal memory access
Commit: https://github.com/vim/vim/commit/5dc294a7b63ed0e508dd360bc4d98173f1a1aeec
Author: zeertzjq <zeertzjq@outlook.com>
Date: Fri Apr 15 13:17:57 2022 +0100
patch 8.2.4752: wrong 'statusline' value can cause illegal memory access
Problem: Wrong 'statusline' value can cause illegal memory access.
Solution: Properly check the value. (closes https://github.com/vim/vim/issues/10192)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 15 Apr 2022 14:30:03 +0200 |
parents | c8d6c2736796 |
children | fd5942a62312 |
line wrap: on
line diff
--- a/src/testdir/test_options.vim +++ b/src/testdir/test_options.vim @@ -392,8 +392,16 @@ func Test_set_errors() call assert_fails('set rulerformat=%15(%%', 'E542:') call assert_fails('set statusline=%$', 'E539:') call assert_fails('set statusline=%{', 'E540:') + call assert_fails('set statusline=%{%', 'E540:') + call assert_fails('set statusline=%{%}', 'E539:') call assert_fails('set statusline=%(', 'E542:') call assert_fails('set statusline=%)', 'E542:') + call assert_fails('set tabline=%$', 'E539:') + call assert_fails('set tabline=%{', 'E540:') + call assert_fails('set tabline=%{%', 'E540:') + call assert_fails('set tabline=%{%}', 'E539:') + call assert_fails('set tabline=%(', 'E542:') + call assert_fails('set tabline=%)', 'E542:') if has('cursorshape') " This invalid value for 'guicursor' used to cause Vim to crash.