Fix cgs.teamVoteString buffer overflow in CG_ConfigStringModified

Found by Coverity.
This commit is contained in:
Zack Middleton committed 2015-07-12 21:08:16 -05:00
1 parent a5fbc1bfc4
commit 604b63f00f
1 file changed
+1 -1
+1 -1
View File
@@ -326,7 +326,7 @@ static void CG_ConfigStringModified( void ) {
cgs.teamVoteNo[num-CS_TEAMVOTE_NO] = atoi( str );
cgs.teamVoteModified[num-CS_TEAMVOTE_NO] = qtrue;
} else if ( num >= CS_TEAMVOTE_STRING && num <= CS_TEAMVOTE_STRING + 1) {
Q_strncpyz( cgs.teamVoteString[num-CS_TEAMVOTE_STRING], str, sizeof( cgs.teamVoteString ) );
Q_strncpyz( cgs.teamVoteString[num-CS_TEAMVOTE_STRING], str, sizeof( cgs.teamVoteString[0] ) );
#ifdef MISSIONPACK
trap_S_StartLocalSound( cgs.media.voteNow, CHAN_ANNOUNCER );
#endif