Skip to content

Commit 4465529

Browse files
committed
Fix backend crash in parsing incorrect tsquery.
Per report from Jon Rosebaugh <jon@inklesspen.com>
1 parent eb19144 commit 4465529

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

contrib/tsearch2/query.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,12 +159,14 @@ gettoken_query(QPRS_STATE * state, int4 *val, int4 *lenval, char **strval, int2
159159
(state->buf)++; /* can safely ++, t_iseq guarantee
160160
* that pg_mblen()==1 */
161161
*val = (int4) '!';
162+
state->state = WAITOPERAND;
162163
return OPR;
163164
}
164165
else if (t_iseq(state->buf, '('))
165166
{
166167
state->count++;
167168
(state->buf)++;
169+
state->state = WAITOPERAND;
168170
return OPEN;
169171
}
170172
else if (t_iseq(state->buf, ':'))

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy