diff --git a/engine/code/game/g_client.c b/engine/code/game/g_client.c index 55e45767..dca1ddf9 100644 --- a/engine/code/game/g_client.c +++ b/engine/code/game/g_client.c @@ -1045,11 +1045,11 @@ void ClientUserinfoChanged( int clientNum ) { teamLeader = client->sess.teamLeader; // colors - strcpy(c1, Info_ValueForKey( userinfo, "color1" )); - strcpy(c2, Info_ValueForKey( userinfo, "color2" )); + Q_strncpyz(c1, Info_ValueForKey( userinfo, "color1" ), sizeof( c1 )); + Q_strncpyz(c2, Info_ValueForKey( userinfo, "color2" ), sizeof( c2 )); - strcpy(redTeam, Info_ValueForKey( userinfo, "g_redteam" )); - strcpy(blueTeam, Info_ValueForKey( userinfo, "g_blueteam" )); + Q_strncpyz(redTeam, Info_ValueForKey( userinfo, "g_redteam" ), sizeof( redTeam )); + Q_strncpyz(blueTeam, Info_ValueForKey( userinfo, "g_blueteam" ), sizeof( blueTeam )); // STONELANCE - UPDATE: need to add names for green and yellow teams? // send over a subset of the userinfo keys so other clients can diff --git a/engine/code/q3_ui/ui_gameinfo.c b/engine/code/q3_ui/ui_gameinfo.c index 5ca82264..9aa640bf 100644 --- a/engine/code/q3_ui/ui_gameinfo.c +++ b/engine/code/q3_ui/ui_gameinfo.c @@ -176,7 +176,7 @@ static void UI_LoadArenas( void ) { int numdirs; vmCvar_t arenasFile; char filename[128]; - char dirlist[1024]; + char dirlist[4096]; char* dirptr; int i, n; int dirlen; @@ -199,7 +199,7 @@ static void UI_LoadArenas( void ) { } // get all arenas from .arena files - numdirs = trap_FS_GetFileList("scripts", ".arena", dirlist, 1024 ); + numdirs = trap_FS_GetFileList("scripts", ".arena", dirlist, 4096 ); dirptr = dirlist; for (i = 0; i < numdirs; i++, dirptr += dirlen+1) { dirlen = strlen(dirptr);