r1280 - trunk/code/qcommon

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Tue Mar 25 18:06:08 EDT 2008


Author: thilo
Date: 2008-03-25 18:06:08 -0400 (Tue, 25 Mar 2008)
New Revision: 1280

Modified:
   trunk/code/qcommon/q_shared.c
Log:
strcpy -> memmove as string does overlap which should be avoided according to the manpage. Thanks to Jacques Boscq.


Modified: trunk/code/qcommon/q_shared.c
===================================================================
--- trunk/code/qcommon/q_shared.c	2008-03-25 21:59:31 UTC (rev 1279)
+++ trunk/code/qcommon/q_shared.c	2008-03-25 22:06:08 UTC (rev 1280)
@@ -1143,7 +1143,8 @@
 
 		if (!strcmp (key, pkey) )
 		{
-			strcpy (start, s);	// remove this part
+			memmove(start, s, strlen(s) + 1); // remove this part
+			
 			return;
 		}
 




More information about the quake3-commits mailing list