summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <tnurnberg@mysql.com/white.intern.koehntopp.de>2007-11-26 09:38:42 +0100
committerunknown <tnurnberg@mysql.com/white.intern.koehntopp.de>2007-11-26 09:38:42 +0100
commit5ce7cdbe54667610f3ab1acf849985d637472e1d (patch)
tree5819bf227cbd0fa0f788418dd01cdbd4c7bef0dd /sql
parentd7d7b10b532691186d047e44cb200b30a59c4d75 (diff)
downloadmariadb-git-5ce7cdbe54667610f3ab1acf849985d637472e1d.tar.gz
Bug#31752: check strmake() bounds
strmake() called with wrong parameters: 5.1-specific fixes. sql/sql_db.cc: fix off-by-one buffer-length
Diffstat (limited to 'sql')
-rw-r--r--sql/sql_db.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_db.cc b/sql/sql_db.cc
index abbf2131957..5fd0f873364 100644
--- a/sql/sql_db.cc
+++ b/sql/sql_db.cc
@@ -1387,7 +1387,7 @@ static void backup_current_db_name(THD *thd,
}
else
{
- strmake(saved_db_name->str, thd->db, saved_db_name->length);
+ strmake(saved_db_name->str, thd->db, saved_db_name->length - 1);
saved_db_name->length= thd->db_length;
}
}