diff options
| author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-01-26 08:17:08 -0500 |
|---|---|---|
| committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-01-26 17:38:30 -0500 |
| commit | 08c5a874ab97d52e215025ccd010d68fcdf14731 (patch) | |
| tree | df47490305b3c01878863ee47a08a7da882b0d59 /src/nvim/testdir | |
| parent | 6f073ccbf464e2f2cd6d6855aa3f27ee1adcc20d (diff) | |
| download | rneovim-08c5a874ab97d52e215025ccd010d68fcdf14731.tar.gz rneovim-08c5a874ab97d52e215025ccd010d68fcdf14731.tar.bz2 rneovim-08c5a874ab97d52e215025ccd010d68fcdf14731.zip | |
vim-patch:8.1.1143: may pass weird strings to file name expansion
Problem: May pass weird strings to file name expansion.
Solution: Check for matching characters. Disallow control characters.
https://github.com/vim/vim/commit/8f130eda4747e4a4d68353cdb650f359fd01469b
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_escaped_glob.vim | 2 | ||||
| -rw-r--r-- | src/nvim/testdir/test_spell.vim | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/nvim/testdir/test_escaped_glob.vim b/src/nvim/testdir/test_escaped_glob.vim index aad3a1e835..2bfd82c296 100644 --- a/src/nvim/testdir/test_escaped_glob.vim +++ b/src/nvim/testdir/test_escaped_glob.vim @@ -17,7 +17,7 @@ function Test_glob() " Setting 'shell' to an invalid name causes a memory leak. sandbox call assert_equal("", glob('Xxx\{')) sandbox call assert_equal("", glob('Xxx\$')) - w! Xxx{ + w! Xxx\{ " } to fix highlighting w! Xxx\$ sandbox call assert_equal("Xxx{", glob('Xxx\{')) diff --git a/src/nvim/testdir/test_spell.vim b/src/nvim/testdir/test_spell.vim index e2016d7927..098cd957ae 100644 --- a/src/nvim/testdir/test_spell.vim +++ b/src/nvim/testdir/test_spell.vim @@ -151,6 +151,12 @@ func Test_spellinfo() set nospell spelllang=en call assert_fails('spellinfo', 'E756:') + call assert_fails('set spelllang=foo/bar', 'E474:') + call assert_fails('set spelllang=foo\ bar', 'E474:') + call assert_fails("set spelllang=foo\\\nbar", 'E474:') + call assert_fails("set spelllang=foo\\\rbar", 'E474:') + call assert_fails("set spelllang=foo+bar", 'E474:') + set enc& spell& spelllang& bwipe endfunc |