[iortcw] 121/497: All: Fix max bans range check in SV_AddBanToList

Simon McVittie smcv at debian.org
Fri Sep 8 10:36:36 UTC 2017


This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to annotated tag 1.42d
in repository iortcw.

commit 25213dbcd411fa3d2cbeae8d2e60e7fc34cbf565
Author: M4N4T4RMS at gmail.com <M4N4T4RMS at gmail.com@e65d2741-a53d-b2dc-ae96-bb75fa5e4c4a>
Date:   Mon May 26 10:20:12 2014 +0000

    All: Fix max bans range check in SV_AddBanToList
---
 MP/code/server/sv_ccmds.c | 2 +-
 SP/code/server/sv_ccmds.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/MP/code/server/sv_ccmds.c b/MP/code/server/sv_ccmds.c
index a11f997..52b7077 100644
--- a/MP/code/server/sv_ccmds.c
+++ b/MP/code/server/sv_ccmds.c
@@ -1033,7 +1033,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;
diff --git a/SP/code/server/sv_ccmds.c b/SP/code/server/sv_ccmds.c
index 468ade1..4030229 100644
--- a/SP/code/server/sv_ccmds.c
+++ b/SP/code/server/sv_ccmds.c
@@ -1046,7 +1046,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;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/iortcw.git



More information about the Pkg-games-commits mailing list