aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-04-04 07:28:03 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-04-04 09:37:40 +0800
commit945caeeda2f0a9c660cf05f655dad5d7a88cd4f5 (patch)
treec7a8231325c3a1eac65147fcdfdca2584073ed35 /src/nvim/testdir
parent1f038bc592282ca60982b288b4c4bc48fcb37839 (diff)
downloadrneovim-945caeeda2f0a9c660cf05f655dad5d7a88cd4f5.tar.gz
rneovim-945caeeda2f0a9c660cf05f655dad5d7a88cd4f5.tar.bz2
rneovim-945caeeda2f0a9c660cf05f655dad5d7a88cd4f5.zip
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.
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_spell.vim8
1 files changed, 8 insertions, 0 deletions
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