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 committed 2014-05-25 18:41:51 -05:00
1 parent eea9fbdb61
commit 7a4ef47476
1 file changed
+1 -1
+1 -1
View File
@@ -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;