diff options
author | Teodor Sigaev | 2007-02-12 14:14:33 +0000 |
---|---|---|
committer | Teodor Sigaev | 2007-02-12 14:14:33 +0000 |
commit | 44655290ccc1931015f5d05ddf3a146fbd5370b7 (patch) | |
tree | 6847df3f231a2179fe9dac29024ad13a7c73d063 | |
parent | eb19144894b0ed44602d6cb8daee9eaa59c902c5 (diff) |
Fix backend crash in parsing incorrect tsquery.
Per report from Jon Rosebaugh <[email protected]>
-rw-r--r-- | contrib/tsearch2/query.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/contrib/tsearch2/query.c b/contrib/tsearch2/query.c index 902ee22fe5..ea8790df25 100644 --- 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, ':')) |