1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

Fixed access to uninitalized memory found by valgrind

This commit is contained in:
Monty
2020-05-15 11:51:31 +03:00
parent a7c4e85dd6
commit 3eadb135fd

View File

@@ -1958,7 +1958,7 @@ send_event_to_slave(binlog_send_info *info, Log_event_type event_type,
pos= my_b_tell(log);
if (repl_semisync_master.update_sync_header(info->thd,
(uchar*) packet->c_ptr(),
(uchar*) packet->c_ptr_safe(),
info->log_file_name + info->dirlen,
pos, &need_sync))
{
@@ -1982,7 +1982,8 @@ send_event_to_slave(binlog_send_info *info, Log_event_type event_type,
}
}
if (need_sync && repl_semisync_master.flush_net(info->thd, packet->c_ptr()))
if (need_sync && repl_semisync_master.flush_net(info->thd,
packet->c_ptr_safe()))
{
info->error= ER_UNKNOWN_ERROR;
return "Failed to run hook 'after_send_event'";