mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-01-12 18:34:36 +08:00
Check number of affixes to prevent core dump with zero number of affixes
This commit is contained in:
parent
9ce51f3aa6
commit
a6fefc866c
@ -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…
Reference in New Issue
Block a user