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: eb19144)
Fix backend crash in parsing incorrect tsquery.
2007年2月12日 14:14:33 +0000 (14:14 +0000)
2007年2月12日 14:14:33 +0000 (14:14 +0000)
Per report from Jon Rosebaugh <jon@inklesspen.com>


diff --git a/contrib/tsearch2/query.c b/contrib/tsearch2/query.c
index 902ee22fe545201c085867c82393e4c57dc5ec2b..ea8790df25b5ec85d74dcd210799e73959fb255d 100644 (file)
--- a/contrib/tsearch2/query.c
+++ b/contrib/tsearch2/query.c
@@ -159,12 +159,14 @@ gettoken_query(QPRS_STATE * state, int4 *val, int4 *lenval, char **strval, int2
(state->buf)++; /* can safely ++, t_iseq guarantee
* that pg_mblen()==1 */
*val = (int4) '!';
+ state->state = WAITOPERAND;
return OPR;
}
else if (t_iseq(state->buf, '('))
{
state->count++;
(state->buf)++;
+ state->state = WAITOPERAND;
return OPEN;
}
else if (t_iseq(state->buf, ':'))
This is the main PostgreSQL git repository.
RSS Atom

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