summaryrefslogtreecommitdiff
path: root/sql/sp.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sp.cc')
-rw-r--r--sql/sp.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/sp.cc b/sql/sp.cc
index 87eb40c29ac..7385a6ffcae 100644
--- a/sql/sp.cc
+++ b/sql/sp.cc
@@ -779,6 +779,9 @@ db_load_routine(THD *thd, int type, sp_name *name, sp_head **sphp,
int ret= 0;
+ if (check_stack_overrun(thd, STACK_MIN_SIZE, (uchar*)&ret))
+ return TRUE;
+
thd->lex= &newlex;
newlex.current_select= NULL;
@@ -1505,6 +1508,9 @@ sp_find_routine(THD *thd, int type, sp_name *name, sp_cache **cp,
(int) name->m_name.length, name->m_name.str,
type, cache_only));
+ if (check_stack_overrun(thd, STACK_MIN_SIZE, (uchar*)&depth))
+ return NULL;
+
if ((sp= sp_cache_lookup(cp, name)))
{
ulong level;