From 0ea43872708cb6673cbe0fc0d081f55b40fac1a4 Mon Sep 17 00:00:00 2001 From: Thilo Schulz Date: Tue, 25 Mar 2008 22:06:08 +0000 Subject: [PATCH] strcpy -> memmove as string does overlap which should be avoided according to the manpage. Thanks to Jacques Boscq. --- code/qcommon/q_shared.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/qcommon/q_shared.c b/code/qcommon/q_shared.c index 5ce6bbf9..18b71d3d 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; }