diff options
author | He Zhenxing <zhenxing.he@sun.com> | 2010-06-02 18:57:52 +0800 |
---|---|---|
committer | He Zhenxing <zhenxing.he@sun.com> | 2010-06-02 18:57:52 +0800 |
commit | e0042460e70c95bd2f633a0bc0d830386f8dac31 (patch) | |
tree | c056e92434b54e9ec50e26fda649c0621c47645b /plugin | |
parent | 9547a63ded3d6a522dc4edf9a8b77b7e2526300d (diff) | |
download | mariadb-git-e0042460e70c95bd2f633a0bc0d830386f8dac31.tar.gz |
Post fix for bug#52748
Diffstat (limited to 'plugin')
-rw-r--r-- | plugin/semisync/semisync_master.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plugin/semisync/semisync_master.cc b/plugin/semisync/semisync_master.cc index 20d1c6d609c..c7e5bdeb9a6 100644 --- a/plugin/semisync/semisync_master.cc +++ b/plugin/semisync/semisync_master.cc @@ -1126,12 +1126,13 @@ int ReplSemiSyncMaster::readSlaveReply(NET *net, uint32 server_id, log_file_pos = uint8korr(packet + REPLY_BINLOG_POS_OFFSET); log_file_len = packet_len - REPLY_BINLOG_NAME_OFFSET; - if (log_file_len > FN_REFLEN) + if (log_file_len >= FN_REFLEN) { sql_print_error("Read semi-sync reply binlog file length too large"); goto l_end; } strncpy(log_file_name, (const char*)packet + REPLY_BINLOG_NAME_OFFSET, log_file_len); + log_file_name[log_file_len] = 0; if (trc_level & kTraceDetail) sql_print_information("%s: Got reply (%s, %lu)", |