From: Bram Moolenaar Date: Sun, 1 Aug 2010 13:47:35 +0000 (+0200) Subject: Avoid illegal memory access in spell suggestion. (Dominique Pelle) X-Git-Tag: v7.3~115 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7e88c3dc1987c9e2ae7d626c277add7ec7c6d401;p=vim Avoid illegal memory access in spell suggestion. (Dominique Pelle) --- diff --git a/src/spell.c b/src/spell.c index 8ae264df5..b7e91ae36 100644 --- a/src/spell.c +++ b/src/spell.c @@ -11658,7 +11658,7 @@ suggest_trie_walk(su, lp, fword, soundfold) * words, the edit distance and then add them. */ add_sound_suggest(su, preword, sp->ts_score, lp); } - else + else if (sp->ts_fidx > 0) { /* Give a penalty when changing non-word char to word * char, e.g., "thes," -> "these". */