1
0
forked from aniani/vim

patch 8.2.5007: spell suggestion may use uninitialized memory

Problem:    Spell suggestion may use uninitialized memory. (Zdenek Dohnal)
Solution:   Avoid going over the end of the word.
This commit is contained in:
Bram Moolenaar
2022-05-23 12:01:50 +01:00
parent 68e64d2c17
commit 6d24b4ff69
3 changed files with 24 additions and 4 deletions

View File

@@ -1953,7 +1953,8 @@ suggest_trie_walk(
#endif
++depth;
sp = &stack[depth];
++sp->ts_fidx;
if (fword[sp->ts_fidx] != NUL)
++sp->ts_fidx;
tword[sp->ts_twordlen++] = c;
sp->ts_arridx = idxs[arridx];
if (newscore == SCORE_SUBST)