Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions modules/speller/default/affix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1196,6 +1196,10 @@ SimpleString SfxEntry::add(SimpleString word, ObjStack & buf,
break;
}
if (cond < 0) {
// conditions are checked against orig_word, but the suffix is
// stripped from word, which may be shorter (e.g. after a
// cross-product prefix). Bail if it can't hold the strip.
if (word.size <= stripl) return SimpleString();
int alen = word.size - stripl;
if (alen >= limit) return EMPTY;
/* we have a match so add suffix */
Expand Down