From: havoc Date: Tue, 13 Nov 2007 01:59:09 +0000 (+0000) Subject: changed two memcpy calls to memmove after testing in valgrind (no other X-Git-Tag: xonotic-v0.1.0preview~2788 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=abe6cda3b3163d51889aec4a6276a01d795f0c25;p=xonotic%2Fdarkplaces.git changed two memcpy calls to memmove after testing in valgrind (no other errors found, and these are in original Quake code) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7693 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/cmd.c b/cmd.c index e9e3a971..e8a275f5 100644 --- a/cmd.c +++ b/cmd.c @@ -181,7 +181,7 @@ void Cbuf_Execute (void) { i++; cmd_text.cursize -= i; - memcpy (cmd_text.data, text+i, cmd_text.cursize); + memmove (cmd_text.data, text+i, cmd_text.cursize); } // execute the command line diff --git a/netconn.c b/netconn.c index ca412f53..9ef54550 100755 --- a/netconn.c +++ b/netconn.c @@ -1091,7 +1091,7 @@ static int NetConn_ReceivedMessage(netconn_t *conn, unsigned char *data, int len unsigned int *header; conn->sendMessageLength -= MAX_PACKETFRAGMENT; - memcpy(conn->sendMessage, conn->sendMessage+MAX_PACKETFRAGMENT, conn->sendMessageLength); + memmove(conn->sendMessage, conn->sendMessage+MAX_PACKETFRAGMENT, conn->sendMessageLength); if (conn->sendMessageLength <= MAX_PACKETFRAGMENT) {