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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user