summaryrefslogtreecommitdiff
path: root/sql/log.cc
diff options
context:
space:
mode:
authortnurnberg@mysql.com/white.intern.koehntopp.de <>2007-11-26 08:20:40 +0100
committertnurnberg@mysql.com/white.intern.koehntopp.de <>2007-11-26 08:20:40 +0100
commit1a95ed1df2bdd26444a973e07ffd84c045deb734 (patch)
treee6e0d5c6e9e90e5a7e95d8325c0eedbee083ff12 /sql/log.cc
parent39f6cbc221a7b8d88326a6fab41fa1459e8b9dbe (diff)
downloadmariadb-git-1a95ed1df2bdd26444a973e07ffd84c045deb734.tar.gz
Bug#31752: check strmake() bounds
strmake() calls are easy to get wrong. Add checks in extra debug mode to identify possible exploits. Remove some dead code. Remove some off-by-one errors identified with new checks.
Diffstat (limited to 'sql/log.cc')
-rw-r--r--sql/log.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/log.cc b/sql/log.cc
index b91ec2b3dee..5a4f02a827b 100644
--- a/sql/log.cc
+++ b/sql/log.cc
@@ -966,7 +966,7 @@ void MYSQL_LOG::make_log_name(char* buf, const char* log_ident)
if (dir_len > FN_REFLEN)
dir_len=FN_REFLEN-1;
strnmov(buf, log_file_name, dir_len);
- strmake(buf+dir_len, log_ident, FN_REFLEN - dir_len);
+ strmake(buf+dir_len, log_ident, FN_REFLEN - dir_len -1);
}