diff options
Diffstat (limited to 'debian/patches/CVE-2021-3928.patch')
-rw-r--r-- | debian/patches/CVE-2021-3928.patch | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/debian/patches/CVE-2021-3928.patch b/debian/patches/CVE-2021-3928.patch new file mode 100644 index 0000000..f7e1764 --- /dev/null +++ b/debian/patches/CVE-2021-3928.patch @@ -0,0 +1,40 @@ +From: Markus Koschany <apo@debian.org> +Date: Wed, 19 Oct 2022 19:21:36 +0200 +Subject: CVE-2021-3928 + +Origin: https://github.com/vim/vim/commit/15d9890eee53afc61eb0a03b878a19cb5672f732 +--- + src/spell.c | 2 +- + src/testdir/test_spell.vim | 10 ++++++++++ + 2 files changed, 11 insertions(+), 1 deletion(-) + +--- a/src/spell.c ++++ b/src/spell.c +@@ -4616,7 +4616,7 @@ suggest_trie_walk( + * char, e.g., "thes," -> "these". */ + p = fword + sp->ts_fidx; + MB_PTR_BACK(fword, p); +- if (!spell_iswordp(p, curwin)) ++ if (!spell_iswordp(p, curwin) && *preword != NUL) + { + p = preword + STRLEN(preword); + MB_PTR_BACK(preword, p); +--- a/src/testdir/test_spell.vim ++++ b/src/testdir/test_spell.vim +@@ -436,6 +436,16 @@ func RunGoodBad(good, bad, expected_word + bwipe! + endfunc + ++func Test_spell_single_word() ++ set spell ++ new ++ silent! norm 0R00 ++ spell! ß ++ silent 0norm 0r$ Dvz= ++ set nospell ++ bwipe! ++endfunc ++ + let g:test_data_aff1 = [ + \"SET ISO8859-1", + \"TRY esianrtolcdugmphbyfvkwjkqxz-\xEB\xE9\xE8\xEA\xEF\xEE\xE4\xE0\xE2\xF6\xFC\xFB'ESIANRTOLCDUGMPHBYFVKWJKQXZ", |