aboutsummaryrefslogtreecommitdiffstats
path: root/code
diff options
context:
space:
mode:
authorthilo <thilo@edf5b092-35ff-0310-97b2-ce42778d08ea>2008-03-25 22:06:08 +0000
committerthilo <thilo@edf5b092-35ff-0310-97b2-ce42778d08ea>2008-03-25 22:06:08 +0000
commit905b6f3855e83d6d511bc350b46a5f5726618aa1 (patch)
tree2b8670999ba29c125031e98085cf0441f3b5b020 /code
parent9b280b5f4b6eaa4a827ac1cbddf2acd07d1e1662 (diff)
downloadioquake3-aero-905b6f3855e83d6d511bc350b46a5f5726618aa1.tar.gz
ioquake3-aero-905b6f3855e83d6d511bc350b46a5f5726618aa1.zip
strcpy -> memmove as string does overlap which should be avoided according to the manpage. Thanks to Jacques Boscq.
git-svn-id: svn://svn.icculus.org/quake3/trunk@1280 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code')
-rw-r--r--code/qcommon/q_shared.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/code/qcommon/q_shared.c b/code/qcommon/q_shared.c
index 5ce6bbf..18b71d3 100644
--- a/code/qcommon/q_shared.c
+++ b/code/qcommon/q_shared.c
@@ -1143,7 +1143,8 @@ void Info_RemoveKey( char *s, const char *key ) {
if (!strcmp (key, pkey) )
{
- strcpy (start, s); // remove this part
+ memmove(start, s, strlen(s) + 1); // remove this part
+
return;
}