projects
/
users
/
bernd
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9da7edc
)
Prevent recursion during parse of email-like string with multiple '@'.
author
Teodor Sigaev
<
[email protected]
>
Tue, 10 Mar 2009 17:44:44 +0000
(17:44 +0000)
committer
Teodor Sigaev
<
[email protected]
>
Tue, 10 Mar 2009 17:44:44 +0000
(17:44 +0000)
Patch by Heikki Linnakangas <
[email protected]
>
contrib/tsearch2/wordparser/parser.c
patch
|
blob
|
blame
|
history
diff --git
a/contrib/tsearch2/wordparser/parser.c
b/contrib/tsearch2/wordparser/parser.c
index 9d0a3704857e98e5480a89f9b7c8676c9a4d3dfc..2a65cc5bc5b0b01767a56b0d90c9debb180eb053 100644
(file)
--- a/
contrib/tsearch2/wordparser/parser.c
+++ b/
contrib/tsearch2/wordparser/parser.c
@@
-370,6
+370,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->lenbytelexeme;
@@
-801,6
+803,7
@@
static TParserStateActionItem actionTPS_InHost[] = {
};
static 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}
};