git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b0c68c2)
Prevent recursion during parse of email-like string with multiple '@'.
2009年3月10日 17:32:14 +0000 (17:32 +0000)
2009年3月10日 17:32:14 +0000 (17:32 +0000)
Patch by Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>


diff --git a/src/backend/tsearch/wparser_def.c b/src/backend/tsearch/wparser_def.c
index 8d7cc1b8d504d391314e8b8348933a2a6fc57fcf..1174b3fb774839661897475884335f38f77094bc 100644 (file)
--- a/src/backend/tsearch/wparser_def.c
+++ b/src/backend/tsearch/wparser_def.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/tsearch/wparser_def.c,v 1.21 2009年03月02日 15:10:09 teodor Exp $
+ * $PostgreSQL: pgsql/src/backend/tsearch/wparser_def.c,v 1.22 2009年03月10日 17:32:14 teodor Exp $
*
*-------------------------------------------------------------------------
*/
@@ -620,6 +620,8 @@ p_ishost(TParser *prs)
TParser *tmpprs = TParserInit(prs->str + prs->state->posbyte, prs->lenstr - prs->state->posbyte);
int res = 0;
+ tmpprs->wanthost = true;
+
if (TParserGet(tmpprs) && tmpprs->type == HOST)
{
prs->state->posbyte += tmpprs->lenbytetoken;
@@ -1070,6 +1072,7 @@ static const TParserStateActionItem actionTPS_InHost[] = {
};
static const TParserStateActionItem actionTPS_InEmail[] = {
+ {p_isstophost, 0, A_POP, TPS_Null, 0, NULL},
{p_ishost, 0, A_BINGO | A_CLRALL, TPS_Base, EMAIL, NULL},
{NULL, 0, A_POP, TPS_Null, 0, NULL}
};
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /