Check number of affixes to prevent core dump with zero number of affixes

REL8_2_STABLE
Teodor Sigaev 21 years ago
parent 9ce51f3aa6
commit a6fefc866c
  1. 3
      contrib/tsearch2/ispell/spell.c

@ -719,6 +719,9 @@ NISortAffixes(IspellDict * Conf)
CMPDAffix *ptr;
int firstsuffix = -1;
if (Conf->naffixes==0)
return;
if (Conf->naffixes > 1)
qsort((void *) Conf->Affix, Conf->naffixes, sizeof(AFFIX), cmpaffix);

Loading…
Cancel
Save