aboutsummaryrefslogtreecommitdiffstats
path: root/main/zoneminder/0001-zm_event-fix-overlap-in-memcpy-buffers.patch
blob: 02ed8688fb87f1850ad1218952f76a771b8b8576 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
From 5b047dc74b4105b39cacc675eabb8ed9f033cee3 Mon Sep 17 00:00:00 2001
From: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
Date: Sat, 20 Feb 2016 23:58:07 +0200
Subject: [PATCH] zm_event: fix overlap in memcpy buffers

---
 src/zm_event.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/zm_event.cpp b/src/zm_event.cpp
index 1f1fb0f..a34ce50 100644
--- a/src/zm_event.cpp
+++ b/src/zm_event.cpp
@@ -1121,7 +1121,7 @@ void EventStream::processCommand( const CmdMsg *msg )
 
     DataMsg status_msg;
     status_msg.msg_type = MSG_DATA_EVENT;
-    memcpy( &status_msg.msg_data, &status_data, sizeof(status_msg.msg_data) );
+    memcpy( &status_msg.msg_data, &status_data, sizeof(status_data) );
     if ( sendto( sd, &status_msg, sizeof(status_msg), MSG_DONTWAIT, (sockaddr *)&rem_addr, sizeof(rem_addr) ) < 0 )
     {
         //if ( errno != EAGAIN )
-- 
2.5.0