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:
parent
eea9fbdb61
commit
7a4ef47476
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue