Skip to content

Commit

Permalink
Fix max bans range check in SV_AddBanToList
Browse files Browse the repository at this point in the history
Adding too many bans would write out of bounds. Found by Coverity.
  • Loading branch information
zturtleman committed May 25, 2014
1 parent eea9fbd commit 7a4ef47
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/server/sv_ccmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,7 @@ static void SV_AddBanToList(qboolean isexception)
return;
}

if(serverBansCount > ARRAY_LEN(serverBans))
if(serverBansCount >= ARRAY_LEN(serverBans))
{
Com_Printf ("Error: Maximum number of bans/exceptions exceeded.\n");
return;
Expand Down

0 comments on commit 7a4ef47

Please sign in to comment.