summaryrefslogtreecommitdiff
path: root/sql/sp.cc
diff options
context:
space:
mode:
authorunknown <tnurnberg@mysql.com/white.intern.koehntopp.de>2007-11-26 09:13:23 +0100
committerunknown <tnurnberg@mysql.com/white.intern.koehntopp.de>2007-11-26 09:13:23 +0100
commit1c72446ef69cf6c50cf9b2dae69b2b24a7576103 (patch)
treeaf61eb4308a4957b098cc00e4e557672f7f68cfa /sql/sp.cc
parentfe280afa26ba21f6c1ba3edc83e930eff96704d0 (diff)
downloadmariadb-git-1c72446ef69cf6c50cf9b2dae69b2b24a7576103.tar.gz
Bug#31752: check strmake() bounds
strmake() called with wrong parameters: 5.0-specific fixes. client/mysql.cc: In debug-mode, strmake() fills unused part of buffer with a test-pattern. This overwrites our previous extra '\0' (from previous bzero()). sql/sp.cc: off-by-one buffer-size.
Diffstat (limited to 'sql/sp.cc')
-rw-r--r--sql/sp.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sp.cc b/sql/sp.cc
index 75d6fa4618f..bae5933aec1 100644
--- a/sql/sp.cc
+++ b/sql/sp.cc
@@ -1902,7 +1902,7 @@ sp_use_new_db(THD *thd, LEX_STRING new_db, LEX_STRING *old_db,
if (thd->db)
{
- old_db->length= (strmake(old_db->str, thd->db, old_db->length) -
+ old_db->length= (strmake(old_db->str, thd->db, old_db->length - 1) -
old_db->str);
}
else