summaryrefslogtreecommitdiff
path: root/plugin/semisync
diff options
context:
space:
mode:
authorHe Zhenxing <zhenxing.he@sun.com>2010-06-02 20:57:39 +0800
committerHe Zhenxing <zhenxing.he@sun.com>2010-06-02 20:57:39 +0800
commita06e034dd44591aecf3d10cbd509a310a701f0c2 (patch)
treee14de2d88ff85a17bf49b0ee591813a6396a74f5 /plugin/semisync
parent02fc237a2c4f14d9a2f9b543f732e2347123717f (diff)
parentf2a9896c471ea2b8a9b1766ba7414d73be7702b1 (diff)
downloadmariadb-git-a06e034dd44591aecf3d10cbd509a310a701f0c2.tar.gz
Auto merge from 5.1-rep-semisync
Diffstat (limited to 'plugin/semisync')
-rw-r--r--plugin/semisync/semisync_master.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugin/semisync/semisync_master.cc b/plugin/semisync/semisync_master.cc
index 40a0833b23f..2701c575b7a 100644
--- a/plugin/semisync/semisync_master.cc
+++ b/plugin/semisync/semisync_master.cc
@@ -1128,12 +1128,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)",