From 15f910da96b9a494fd673ef15639bc036b62d746 Mon Sep 17 00:00:00 2001 From: Teodor Sigaev Date: Mon, 12 Feb 2007 14:15:13 +0000 Subject: [PATCH] Fix backend crash in parsing incorrect tsquery. Per report from Jon Rosebaugh --- contrib/tsearch2/query.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/contrib/tsearch2/query.c b/contrib/tsearch2/query.c index b832deb22e..37f60caf1a 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, ':'))