diff options
author | Noah Misch <noah@leadboat.com> | 2015-10-05 10:06:30 -0400 |
---|---|---|
committer | Noah Misch <noah@leadboat.com> | 2015-10-05 10:06:35 -0400 |
commit | 879877b00bb54ba9dcdef0d218bd36c4e5404d6f (patch) | |
tree | 54cea9388658325b24a7e9727d1f69a63807843d /contrib/intarray/_int_bool.c | |
parent | 9581e2699f6379e29151b0bef04ca45a06f5afe0 (diff) |
Prevent stack overflow in query-type functions.
The tsquery, ltxtquery and query_int data types have a common ancestor.
Having acquired check_stack_depth() calls independently, each was
missing at least one call. Back-patch to 9.0 (all supported versions).
Diffstat (limited to 'contrib/intarray/_int_bool.c')
-rw-r--r-- | contrib/intarray/_int_bool.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/contrib/intarray/_int_bool.c b/contrib/intarray/_int_bool.c index 43cc0d42d5c..ac501b474b7 100644 --- a/contrib/intarray/_int_bool.c +++ b/contrib/intarray/_int_bool.c @@ -575,6 +575,9 @@ typedef struct static void infix(INFIX *in, bool first) { + /* since this function recurses, it could be driven to stack overflow. */ + check_stack_depth(); + if (in->curpol->type == VAL) { RESIZEBUF(in, 11); |