aboutsummaryrefslogtreecommitdiff
path: root/contrib/intarray/_int_bool.c
diff options
context:
space:
mode:
authorNoah Misch <noah@leadboat.com>2015-10-05 10:06:30 -0400
committerNoah Misch <noah@leadboat.com>2015-10-05 10:06:33 -0400
commit7bed97d486bda5761ba7e7982e4133aeded6b852 (patch)
treee8ca48097436e2afa09e5e5ff4d5c2852b35dc67 /contrib/intarray/_int_bool.c
parentacf0da1e6476fd3217781065c7e7654873376568 (diff)
downloadpostgresql-7bed97d486bda5761ba7e7982e4133aeded6b852.tar.gz
postgresql-7bed97d486bda5761ba7e7982e4133aeded6b852.zip
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.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/contrib/intarray/_int_bool.c b/contrib/intarray/_int_bool.c
index c3c39d194bc..5d9e676660f 100644
--- a/contrib/intarray/_int_bool.c
+++ b/contrib/intarray/_int_bool.c
@@ -564,6 +564,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);