Fix max bans range check in SV_AddBanToList

Adding too many bans would write out of bounds. Found by Coverity.
This commit is contained in:
Zack Middleton 2014-05-25 17:38:50 -05:00
parent eea9fbdb61
commit 7a4ef47476

View file

@ -846,7 +846,7 @@ static void SV_AddBanToList(qboolean isexception)
return; return;
} }
if(serverBansCount > ARRAY_LEN(serverBans)) if(serverBansCount >= ARRAY_LEN(serverBans))
{ {
Com_Printf ("Error: Maximum number of bans/exceptions exceeded.\n"); Com_Printf ("Error: Maximum number of bans/exceptions exceeded.\n");
return; return;