[quake3-commits] r1882 - trunk/code/game

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Tue Feb 8 18:16:04 EST 2011


Author: thilo
Date: 2011-02-08 18:16:03 -0500 (Tue, 08 Feb 2011)
New Revision: 1882

Modified:
   trunk/code/game/ai_dmq3.c
Log:
Fix strcpy copying buffer into itself, thanks to Simon McVittie for reporting and the patch (#4894)


Modified: trunk/code/game/ai_dmq3.c
===================================================================
--- trunk/code/game/ai_dmq3.c	2011-02-08 21:38:49 UTC (rev 1881)
+++ trunk/code/game/ai_dmq3.c	2011-02-08 23:16:03 UTC (rev 1882)
@@ -1488,7 +1488,8 @@
 	char *str1, *str2, *ptr, c;
 	char name[128];
 
-	strcpy(name, ClientName(client, name, sizeof(name)));
+	ClientName(client, name, sizeof(name));
+	
 	for (i = 0; name[i]; i++) name[i] &= 127;
 	//remove all spaces
 	for (ptr = strstr(name, " "); ptr; ptr = strstr(name, " ")) {



More information about the quake3-commits mailing list