Skip to content

Commit 3eadb13

Browse files
committed
Fixed access to uninitalized memory found by valgrind
1 parent a7c4e85 commit 3eadb13

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

sql/sql_repl.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1958,7 +1958,7 @@ send_event_to_slave(binlog_send_info *info, Log_event_type event_type,
19581958

19591959
pos= my_b_tell(log);
19601960
if (repl_semisync_master.update_sync_header(info->thd,
1961-
(uchar*) packet->c_ptr(),
1961+
(uchar*) packet->c_ptr_safe(),
19621962
info->log_file_name + info->dirlen,
19631963
pos, &need_sync))
19641964
{
@@ -1982,7 +1982,8 @@ send_event_to_slave(binlog_send_info *info, Log_event_type event_type,
19821982
}
19831983
}
19841984

1985-
if (need_sync && repl_semisync_master.flush_net(info->thd, packet->c_ptr()))
1985+
if (need_sync && repl_semisync_master.flush_net(info->thd,
1986+
packet->c_ptr_safe()))
19861987
{
19871988
info->error= ER_UNKNOWN_ERROR;
19881989
return "Failed to run hook 'after_send_event'";

0 commit comments

Comments
 (0)