mirror of
https://github.com/neovim/neovim.git
synced 2025-10-03 16:36:30 +00:00
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.
6d24b4ff69
This commit is contained in:
@@ -4381,7 +4381,9 @@ static void suggest_trie_walk(suginfo_T *su, langp_T *lp, char_u *fword, bool so
|
||||
#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