summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <pem@mysql.comhem.se>2004-01-26 15:17:35 +0100
committerunknown <pem@mysql.comhem.se>2004-01-26 15:17:35 +0100
commit7e95a257e08e7760f5432704ab22d2d37e6e5f7a (patch)
tree5265bb3058e731bed360353080461401a5d5c6b1 /sql
parent219f51b475120183efee758f82520f267ea2b34b (diff)
downloadmariadb-git-7e95a257e08e7760f5432704ab22d2d37e6e5f7a.tar.gz
Check for possible stack overrun in SP execution.
sql/sp_head.cc: Check for possible stack overrun, in an attempt to handle deep recursion more gracefully. (Not 100% this will always helt though, but it's better than nothing.)
Diffstat (limited to 'sql')
-rw-r--r--sql/sp_head.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/sp_head.cc b/sql/sp_head.cc
index 8ba8ea25684..c40be15d21c 100644
--- a/sql/sp_head.cc
+++ b/sql/sp_head.cc
@@ -277,6 +277,12 @@ sp_head::execute(THD *thd)
int ret= 0;
uint ip= 0;
+#ifndef EMBEDDED_LIBRARY
+ if (check_stack_overrun(thd, olddbptr))
+ {
+ DBUG_RETURN(-1);
+ }
+#endif
if (olddbptr)
{
uint i= 0;