diff options
author | Teodor Sigaev <teodor@sigaev.ru> | 2006-02-06 15:45:34 +0000 |
---|---|---|
committer | Teodor Sigaev <teodor@sigaev.ru> | 2006-02-06 15:45:34 +0000 |
commit | a6fefc866c4bf484127e91260044449dc2ae1ae0 (patch) | |
tree | a205b1eb26c17f7df5d18bac0e0ba70ca795f010 | |
parent | 9ce51f3aa661a1986b5b61c076f36df279024e04 (diff) | |
download | postgresql-a6fefc866c4bf484127e91260044449dc2ae1ae0.tar.gz postgresql-a6fefc866c4bf484127e91260044449dc2ae1ae0.zip |
Check number of affixes to prevent core dump with zero number of affixes
-rw-r--r-- | contrib/tsearch2/ispell/spell.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/contrib/tsearch2/ispell/spell.c b/contrib/tsearch2/ispell/spell.c index d702dbd9cca..69c91470f67 100644 --- a/contrib/tsearch2/ispell/spell.c +++ b/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); |