From aee8dcdff8d9367033d4361a6d35d09efe3b3e82 Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Wed, 5 Dec 2018 17:39:02 +0000 Subject: [PATCH] Fix 64-bit build-using admins not being able to kick players besides themselves, by not checking sendingsavegame[] code at all if not the server it turns out playernode[pn] is typically 255 in the above situation, so sendingsavegame[playernode[pn]] goes out of bounds ...but goodness knows why 32-bit builds didn't suffer the same bug, seems to have been pure luck --- src/d_clisrv.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/d_clisrv.c b/src/d_clisrv.c index 918b11d9..cd8367af 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -2650,13 +2650,16 @@ static void Command_Kick(void) if (pn == -1 || pn == 0) return; - // Special case if we are trying to kick a player who is downloading the game state: - // trigger a timeout instead of kicking them, because a kick would only - // take effect after they have finished downloading - if (sendingsavegame[playernode[pn]]) + if (server) { - Net_ConnectionTimeout(playernode[pn]); - return; + // Special case if we are trying to kick a player who is downloading the game state: + // trigger a timeout instead of kicking them, because a kick would only + // take effect after they have finished downloading + if (sendingsavegame[playernode[pn]]) + { + Net_ConnectionTimeout(playernode[pn]); + return; + } } WRITESINT8(p, pn);