diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2022-07-02 06:37:28 +0800 |
|---|---|---|
| committer | zeertzjq <zeertzjq@outlook.com> | 2022-07-02 06:55:23 +0800 |
| commit | 998a96803b32dada4da26d0dc7a636f99319f0e6 (patch) | |
| tree | 2747b76d2e1efc57828bb837b046ea0300c20316 /src/nvim/testdir | |
| parent | 0b15c019124965920c5f2df8c8ee75cd46311d27 (diff) | |
| download | rneovim-998a96803b32dada4da26d0dc7a636f99319f0e6.tar.gz rneovim-998a96803b32dada4da26d0dc7a636f99319f0e6.tar.bz2 rneovim-998a96803b32dada4da26d0dc7a636f99319f0e6.zip | |
vim-patch:9.0.0021: invalid memory access when adding word to spell word list
Problem: Invalid memory access when adding word with a control character to
the internal spell word list.
Solution: Disallow adding a word with control characters or a trailing
slash.
https://github.com/vim/vim/commit/5e59ea54c0c37c2f84770f068d95280069828774
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_spell.vim | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_spell.vim b/src/nvim/testdir/test_spell.vim index 215d4387d6..d0895a48b4 100644 --- a/src/nvim/testdir/test_spell.vim +++ b/src/nvim/testdir/test_spell.vim @@ -699,6 +699,21 @@ func Test_spellsuggest_too_deep() bwipe! endfunc +func Test_spell_good_word_invalid() + " This was adding a word with a 0x02 byte, which causes havoc. + enew + norm o0 + sil! norm rzzWs00/ + 2 + sil! norm VzGprzzW + sil! norm z= + + bwipe! + " clear the internal word list + " set enc=latin1 + set enc=utf-8 +endfunc + func LoadAffAndDic(aff_contents, dic_contents) throw 'skipped: Nvim does not support enc=latin1' set enc=latin1 |