1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-12646: Apply fixes found by Coverity static analysis tool

Inspired by: https://github.com/devexp-db/mariadb/blob/f27/mariadb-covscan-stroverflow.patch
This commit is contained in:
Daniel Black
2017-05-01 18:34:11 +10:00
committed by Sergei Golubchik
parent f9dbfa58a5
commit 172e3a1bc6
2 changed files with 4 additions and 4 deletions

View File

@ -552,7 +552,7 @@ int ReplSemiSyncMaster::reportReplyBinlog(uint32 server_id,
if (need_copy_send_pos)
{
strcpy(reply_file_name_, log_file_name);
strmake_buf(reply_file_name_, log_file_name);
reply_file_pos_ = log_file_pos;
reply_file_name_inited_ = true;
@ -659,7 +659,7 @@ int ReplSemiSyncMaster::commitTrx(const char* trx_wait_binlog_name,
if (cmp <= 0)
{
/* This thd has a lower position, let's update the minimum info. */
strcpy(wait_file_name_, trx_wait_binlog_name);
strmake_buf(wait_file_name_, trx_wait_binlog_name);
wait_file_pos_ = trx_wait_binlog_pos;
rpl_semi_sync_master_wait_pos_backtraverse++;
@ -670,7 +670,7 @@ int ReplSemiSyncMaster::commitTrx(const char* trx_wait_binlog_name,
}
else
{
strcpy(wait_file_name_, trx_wait_binlog_name);
strmake_buf(wait_file_name_, trx_wait_binlog_name);
wait_file_pos_ = trx_wait_binlog_pos;
wait_file_name_inited_ = true;

View File

@ -260,7 +260,7 @@ int Binlog_storage_delegate::after_flush(THD *thd,
thd->semisync_info= log_info;
}
strcpy(log_info->log_file, log_file+dirname_length(log_file));
strmake_buf(log_info->log_file, log_file+dirname_length(log_file));
log_info->log_pos = log_pos;
FOREACH_OBSERVER(ret, after_flush, false,