zm_monitor: fix overlap in memcpy buffers
behavior undefined by POSIX and causes a crash with FORTIFY_SOURCE
This commit is contained in:
parent
f9b3287539
commit
6332f28c53
|
@ -3981,7 +3981,7 @@ void MonitorStream::processCommand( const CmdMsg *msg )
|
|||
|
||||
DataMsg status_msg;
|
||||
status_msg.msg_type = MSG_DATA_WATCH;
|
||||
memcpy( &status_msg.msg_data, &status_data, sizeof(status_msg.msg_data) );
|
||||
memcpy( &status_msg.msg_data, &status_data, sizeof(status_data) );
|
||||
int nbytes = 0;
|
||||
if ( (nbytes = sendto( sd, &status_msg, sizeof(status_msg), MSG_DONTWAIT, (sockaddr *)&rem_addr, sizeof(rem_addr) )) < 0 )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue