summaryrefslogtreecommitdiff
path: root/regex
diff options
context:
space:
mode:
authorNeeraj Bisht <neeraj.x.bisht@oracle.com>2013-01-14 16:51:52 +0530
committerNeeraj Bisht <neeraj.x.bisht@oracle.com>2013-01-14 16:51:52 +0530
commit1a951e716c87b432ff3653e12e5a1a4f933211d0 (patch)
tree59d42a3d31a24a34b677d3383a42f33feb39b9f5 /regex
parente810f7f4eb3f094d158d902804df5ffb1cc2cc7d (diff)
parent78664f54a0e49c46428c2b8a121d183e429f5686 (diff)
downloadmariadb-git-1a951e716c87b432ff3653e12e5a1a4f933211d0.tar.gz
BUG#14303860 - EXECUTING A SELECT QUERY WITH TOO
MANY WILDCARDS CAUSES A SEGFAULT Back port from 5.6 and trunk
Diffstat (limited to 'regex')
-rw-r--r--regex/my_regex.h2
-rw-r--r--regex/regcomp.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/regex/my_regex.h b/regex/my_regex.h
index 30896e29b91..1f96b8c461e 100644
--- a/regex/my_regex.h
+++ b/regex/my_regex.h
@@ -28,7 +28,7 @@ typedef struct {
/* === regcomp.c === */
-typedef int (*my_regex_stack_check_t)();
+typedef int (*my_regex_stack_check_t)(int);
extern int my_regcomp(my_regex_t *, const char *, int, CHARSET_INFO *charset);
#define REG_BASIC 0000
#define REG_EXTENDED 0001
diff --git a/regex/regcomp.c b/regex/regcomp.c
index 6e2d2511fc1..abc18174f56 100644
--- a/regex/regcomp.c
+++ b/regex/regcomp.c
@@ -227,7 +227,7 @@ int stop; /* character this ERE should end at */
while (MORE() && (c = PEEK()) != '|' && c != stop)
{
if (my_regex_enough_mem_in_stack &&
- my_regex_enough_mem_in_stack())
+ my_regex_enough_mem_in_stack(0))
{
SETERROR(REG_ESPACE);
return;