diff options
author | tnurnberg@mysql.com/white.intern.koehntopp.de <> | 2007-11-26 08:20:40 +0100 |
---|---|---|
committer | tnurnberg@mysql.com/white.intern.koehntopp.de <> | 2007-11-26 08:20:40 +0100 |
commit | 1a95ed1df2bdd26444a973e07ffd84c045deb734 (patch) | |
tree | e6e0d5c6e9e90e5a7e95d8325c0eedbee083ff12 /sql/repl_failsafe.cc | |
parent | 39f6cbc221a7b8d88326a6fab41fa1459e8b9dbe (diff) | |
download | mariadb-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/repl_failsafe.cc')
-rw-r--r-- | sql/repl_failsafe.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/repl_failsafe.cc b/sql/repl_failsafe.cc index 4c8703226a6..4ea90346638 100644 --- a/sql/repl_failsafe.cc +++ b/sql/repl_failsafe.cc @@ -926,7 +926,7 @@ int load_master_data(THD* thd) 0, (SLAVE_IO | SLAVE_SQL))) send_error(thd, ER_MASTER_INFO); strmake(active_mi->master_log_name, row[0], - sizeof(active_mi->master_log_name)); + sizeof(active_mi->master_log_name) -1); active_mi->master_log_pos= my_strtoll10(row[1], (char**) 0, &error); /* at least in recent versions, the condition below should be false */ if (active_mi->master_log_pos < BIN_LOG_HEADER_SIZE) |