diff options
Diffstat (limited to 'src/backend/regex/regexec.c')
-rw-r--r-- | src/backend/regex/regexec.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/backend/regex/regexec.c b/src/backend/regex/regexec.c index 0f14d5ba01e..848b9df3d28 100644 --- a/src/backend/regex/regexec.c +++ b/src/backend/regex/regexec.c @@ -749,6 +749,9 @@ cdissect(struct vars * v, /* handy place to check for operation cancel */ if (CANCEL_REQUESTED(v->re)) return REG_CANCEL; + /* ... and stack overrun */ + if (STACK_TOO_DEEP(v->re)) + return REG_ETOOBIG; switch (t->op) { |