diff options
Diffstat (limited to 'meta/recipes-support/vim/files/0002-patch-8.2.3582-reading-uninitialized-memory-when-giv.patch')
-rw-r--r-- | meta/recipes-support/vim/files/0002-patch-8.2.3582-reading-uninitialized-memory-when-giv.patch | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/meta/recipes-support/vim/files/0002-patch-8.2.3582-reading-uninitialized-memory-when-giv.patch b/meta/recipes-support/vim/files/0002-patch-8.2.3582-reading-uninitialized-memory-when-giv.patch deleted file mode 100644 index d117a98893..0000000000 --- a/meta/recipes-support/vim/files/0002-patch-8.2.3582-reading-uninitialized-memory-when-giv.patch +++ /dev/null | |||
@@ -1,63 +0,0 @@ | |||
1 | CVE: CVE-2021-3928 | ||
2 | Upstream-Status: Backport | ||
3 | Signed-off-by: Ross Burton <ross.burton@arm.com> | ||
4 | |||
5 | From ade0f0481969f1453c60e7c8354b00dfe4238739 Mon Sep 17 00:00:00 2001 | ||
6 | From: Bram Moolenaar <Bram@vim.org> | ||
7 | Date: Thu, 4 Nov 2021 15:46:05 +0000 | ||
8 | Subject: [PATCH] patch 8.2.3582: reading uninitialized memory when giving | ||
9 | spell suggestions | ||
10 | |||
11 | Problem: Reading uninitialized memory when giving spell suggestions. | ||
12 | Solution: Check that preword is not empty. | ||
13 | --- | ||
14 | src/spellsuggest.c | 2 +- | ||
15 | src/testdir/test_spell.vim | 8 ++++++++ | ||
16 | src/version.c | 2 ++ | ||
17 | 3 files changed, 11 insertions(+), 1 deletion(-) | ||
18 | |||
19 | diff --git a/src/spellsuggest.c b/src/spellsuggest.c | ||
20 | index 9d6df7930..8615d5280 100644 | ||
21 | --- a/src/spellsuggest.c | ||
22 | +++ b/src/spellsuggest.c | ||
23 | @@ -1600,7 +1600,7 @@ suggest_trie_walk( | ||
24 | // char, e.g., "thes," -> "these". | ||
25 | p = fword + sp->ts_fidx; | ||
26 | MB_PTR_BACK(fword, p); | ||
27 | - if (!spell_iswordp(p, curwin)) | ||
28 | + if (!spell_iswordp(p, curwin) && *preword != NUL) | ||
29 | { | ||
30 | p = preword + STRLEN(preword); | ||
31 | MB_PTR_BACK(preword, p); | ||
32 | diff --git a/src/testdir/test_spell.vim b/src/testdir/test_spell.vim | ||
33 | index 79fb8927c..e435e9172 100644 | ||
34 | --- a/src/testdir/test_spell.vim | ||
35 | +++ b/src/testdir/test_spell.vim | ||
36 | @@ -498,6 +498,14 @@ func Test_spell_screendump() | ||
37 | call delete('XtestSpell') | ||
38 | endfunc | ||
39 | |||
40 | +func Test_spell_single_word() | ||
41 | + new | ||
42 | + silent! norm 0R00 | ||
43 | + spell! ß | ||
44 | + silent 0norm 0r$ Dvz= | ||
45 | + bwipe! | ||
46 | +endfunc | ||
47 | + | ||
48 | let g:test_data_aff1 = [ | ||
49 | \"SET ISO8859-1", | ||
50 | \"TRY esianrtolcdugmphbyfvkwjkqxz-\xEB\xE9\xE8\xEA\xEF\xEE\xE4\xE0\xE2\xF6\xFC\xFB'ESIANRTOLCDUGMPHBYFVKWJKQXZ", | ||
51 | diff --git a/src/version.c b/src/version.c | ||
52 | index df4ec9a47..e1bc0d09b 100644 | ||
53 | --- a/src/version.c | ||
54 | +++ b/src/version.c | ||
55 | @@ -742,6 +742,8 @@ static char *(features[]) = | ||
56 | |||
57 | static int included_patches[] = | ||
58 | { /* Add new patch number below this line */ | ||
59 | +/**/ | ||
60 | + 3582, | ||
61 | /**/ | ||
62 | 3581, | ||
63 | /**/ | ||