Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 83d0b9f

Browse filesBrowse files
committed
Fixes from Heikki Linnakangas <heikki@enterprisedb.com>:
Apparently it's a bug I introduced when I refactored spell.c to use the readline function for reading and recoding the input file. I didn't notice that some calls to STRNCMP used the non-lowercased version of the input line.
1 parent f243a1a commit 83d0b9f
Copy full SHA for 83d0b9f

File tree

Expand file treeCollapse file tree

1 file changed

+4
-4
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-4
lines changed

‎src/backend/tsearch/spell.c

Copy file name to clipboardExpand all lines: src/backend/tsearch/spell.c
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $PostgreSQL: pgsql/src/backend/tsearch/spell.c,v 1.2 2007/08/25 00:03:59 tgl Exp $
10+
* $PostgreSQL: pgsql/src/backend/tsearch/spell.c,v 1.3 2007/09/10 10:39:56 teodor Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -733,7 +733,6 @@ NIImportAffixes(IspellDict * Conf, const char *filename)
733733
while ((recoded = t_readline(affix)) != NULL)
734734
{
735735
pstr = lowerstr(recoded);
736-
pfree(recoded);
737736

738737
lineno++;
739738

@@ -813,8 +812,8 @@ NIImportAffixes(IspellDict * Conf, const char *filename)
813812
flag = (unsigned char) *s;
814813
goto nextline;
815814
}
816-
if (STRNCMP(str, "COMPOUNDFLAG") == 0 || STRNCMP(str, "COMPOUNDMIN") == 0 ||
817-
STRNCMP(str, "PFX") == 0 || STRNCMP(str, "SFX") == 0)
815+
if (STRNCMP(recoded, "COMPOUNDFLAG") == 0 || STRNCMP(recoded, "COMPOUNDMIN") == 0 ||
816+
STRNCMP(recoded, "PFX") == 0 || STRNCMP(recoded, "SFX") == 0)
818817
{
819818
if (oldformat)
820819
ereport(ERROR,
@@ -834,6 +833,7 @@ NIImportAffixes(IspellDict * Conf, const char *filename)
834833
NIAddAffix(Conf, flag, flagflags, mask, find, repl, suffixes ? FF_SUFFIX : FF_PREFIX);
835834

836835
nextline:
836+
pfree(recoded);
837837
pfree(pstr);
838838
}
839839
FreeFile(affix);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.