diff --git a/codemp/cgame/cg_main.c b/codemp/cgame/cg_main.c index 7876637..e63e809 100644 --- a/codemp/cgame/cg_main.c +++ b/codemp/cgame/cg_main.c @@ -1767,7 +1767,7 @@ static void CG_RegisterSounds( void ) { } // only register the items that the server says we need - strcpy( items, CG_ConfigString( CS_ITEMS ) ); + Q_strncpyz(items, CG_ConfigString(CS_ITEMS), sizeof(items)); for ( i = 1 ; i < bg_numItems ; i++ ) { if ( items[ i ] == '1' || cg_buildScript.integer ) { @@ -2214,7 +2214,7 @@ Ghoul2 Insert End memset( cg_weapons, 0, sizeof( cg_weapons ) ); // only register the items that the server says we need - strcpy( items, CG_ConfigString( CS_ITEMS) ); + Q_strncpyz(items, CG_ConfigString(CS_ITEMS), sizeof(items)); for ( i = 1 ; i < bg_numItems ; i++ ) { if ( items[ i ] == '1' || cg_buildScript.integer ) {