mirror of
https://github.com/postgres/postgres.git
synced 2025-07-31 22:04:40 +03:00
Check number of affixes to prevent core dump with zero number of affixes
This commit is contained in:
@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user