From: Teodor Sigaev Date: Mon, 12 Feb 2007 14:19:26 +0000 (+0000) Subject: Fix backend crash in parsing incorrect tsquery. X-Git-Tag: REL7_4_17~19 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bcac5703ece2264a260c6a167da69dfe537a0ec2;p=thirdparty%2Fpostgresql.git Fix backend crash in parsing incorrect tsquery. Per report from Jon Rosebaugh --- diff --git a/contrib/tsearch2/query.c b/contrib/tsearch2/query.c index 458c55de279..9c4ed370a6b 100644 --- a/contrib/tsearch2/query.c +++ b/contrib/tsearch2/query.c @@ -142,12 +142,14 @@ gettoken_query(QPRS_STATE * state, int4 *val, int4 *lenval, char **strval, int2 { (state->buf)++; *val = (int4) '!'; + state->state = WAITOPERAND; return OPR; } else if (*(state->buf) == '(') { state->count++; (state->buf)++; + state->state = WAITOPERAND; return OPEN; } else if (*(state->buf) == ':')