Unfortunately I discovered this right at ports lock, and chocolate-doom isn't
exactly mission-critical so if its best after release, no worries.

There is a backwards memcpy in chocolate-doom's net_client.c and net_server.c.

I brought the issue upstream and it has been already committed, but not sure
when next release will be.
https://github.com/chocolate-doom/chocolate-doom/issues/510

If we want this right away, it would be the two patches below (apologies,
having issues with cvs diff to make a unified diff atm, perhaps because its
anonymous CVS?)

If we want it, I'll bang my head harder on solving my cvs diff issue
so I can properly give a patch with the revision level bumped.


$OpenBSD$
--- src/net_client.c.orig       Fri Feb 20 22:05:58 2015
+++ src/net_client.c    Fri Feb 20 22:06:10 2015
@@ -279,7 +279,7 @@ static void NET_CL_AdvanceWindow(void)
 
         // Advance the window
 
-        memcpy(recvwindow, recvwindow + 1, 
+        memmove(recvwindow, recvwindow + 1, 
                sizeof(net_server_recv_t) * (BACKUPTICS - 1));
         memset(&recvwindow[BACKUPTICS-1], 0, sizeof(net_server_recv_t));


 
$OpenBSD$
--- src/net_server.c.orig       Fri Feb 20 22:16:32 2015
+++ src/net_server.c    Fri Feb 20 22:16:40 2015
@@ -514,7 +514,7 @@ static void NET_SV_AdvanceWindow(void)
         
         // Advance the window
 
-        memcpy(recvwindow, recvwindow + 1, sizeof(*recvwindow) * (BACKUPTICS - 
1));
+        memmove(recvwindow, recvwindow + 1, sizeof(*recvwindow) * (BACKUPTICS 
- 1));
         memset(&recvwindow[BACKUPTICS-1], 0, sizeof(*recvwindow));
         ++recvwindow_start;
 

Reply via email to