From abe6cda3b3163d51889aec4a6276a01d795f0c25 Mon Sep 17 00:00:00 2001 From: havoc Date: Tue, 13 Nov 2007 01:59:09 +0000 Subject: [PATCH] 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 --- cmd.c | 2 +- netconn.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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) { -- 2.39.2