Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit4283172

Browse files
committed
Prevent recursion during parse of email-like string with multiple '@'.
Patch by Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
1 parentb0c68c2 commit4283172

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎src/backend/tsearch/wparser_def.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $PostgreSQL: pgsql/src/backend/tsearch/wparser_def.c,v 1.21 2009/03/02 15:10:09 teodor Exp $
10+
* $PostgreSQL: pgsql/src/backend/tsearch/wparser_def.c,v 1.22 2009/03/10 17:32:14 teodor Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -620,6 +620,8 @@ p_ishost(TParser *prs)
620620
TParser*tmpprs=TParserInit(prs->str+prs->state->posbyte,prs->lenstr-prs->state->posbyte);
621621
intres=0;
622622

623+
tmpprs->wanthost= true;
624+
623625
if (TParserGet(tmpprs)&&tmpprs->type==HOST)
624626
{
625627
prs->state->posbyte+=tmpprs->lenbytetoken;
@@ -1070,6 +1072,7 @@ static const TParserStateActionItem actionTPS_InHost[] = {
10701072
};
10711073

10721074
staticconstTParserStateActionItemactionTPS_InEmail[]= {
1075+
{p_isstophost,0,A_POP,TPS_Null,0,NULL},
10731076
{p_ishost,0,A_BINGO |A_CLRALL,TPS_Base,EMAIL,NULL},
10741077
{NULL,0,A_POP,TPS_Null,0,NULL}
10751078
};

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp