From 945caeeda2f0a9c660cf05f655dad5d7a88cd4f5 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Mon, 4 Apr 2022 07:28:03 +0800 Subject: vim-patch:8.2.4247: stack corruption when looking for spell suggestions Problem: Stack corruption when looking for spell suggestions. Solution: Prevent the depth increased too much. Add a five second time limit to finding suggestions. https://github.com/vim/vim/commit/06f15416bb8d5636200a10776f1752c4d6e49f31 Cherry-pick parentheses from patch 8.2.4402. --- src/nvim/testdir/test_spell.vim | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_spell.vim b/src/nvim/testdir/test_spell.vim index d3a11aebd8..56ed97cdd9 100644 --- a/src/nvim/testdir/test_spell.vim +++ b/src/nvim/testdir/test_spell.vim @@ -681,6 +681,14 @@ func Test_spell_long_word() set nospell endfunc +func Test_spellsuggest_too_deep() + " This was incrementing "depth" over MAXWLEN. + new + norm s000G00ý000000000000 + sil norm ..vzG................vvzG0 v z= + bwipe! +endfunc + func LoadAffAndDic(aff_contents, dic_contents) throw 'skipped: Nvim does not support enc=latin1' set enc=latin1 -- cgit