projects
/
postgresql.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9ce51f3
)
Check number of affixes to prevent core dump with zero number of affixes
author
Teodor Sigaev
Mon, 6 Feb 2006 15:45:34 +0000
(15:45 +0000)
committer
Teodor Sigaev
Mon, 6 Feb 2006 15:45:34 +0000
(15:45 +0000)
contrib/tsearch2/ispell/spell.c
patch
|
blob
|
blame
|
history
diff --git
a/contrib/tsearch2/ispell/spell.c
b/contrib/tsearch2/ispell/spell.c
index d702dbd9ccafeefca4378c63064cfb2010bc8f5f..69c91470f67c6c345703b7bc3e46006ada82b88e 100644
(file)
--- 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);