From 7067d22da0e06f3eaa1db9d65547ec233876b8fb Mon Sep 17 00:00:00 2001 From: Alug Date: Thu, 3 Apr 2025 20:25:02 +0200 Subject: [PATCH] fix OOB read of "playeringame" not too sure if this is completely save, but it should technically --- src/d_clisrv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/d_clisrv.c b/src/d_clisrv.c index 47b0eb63a..945209c56 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -3355,7 +3355,7 @@ void CL_RemovePlayer(INT32 playernum, INT32 reason) // remove avatar of player playeringame[playernum] = false; playernode[playernum] = UINT8_MAX; - while (!playeringame[doomcom->numslots-1] && doomcom->numslots > 1) + while ((doomcom->numslots > 1) && !playeringame[doomcom->numslots-1]) doomcom->numslots--; // Reset the name