From f05c8ee54868c030b048e0d8c63eacffbbdad80d Mon Sep 17 00:00:00 2001 From: NepDisk Date: Tue, 13 May 2025 16:06:21 -0400 Subject: [PATCH] fix oob write when map has playerstarts for 32 players --- src/p_mobj.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/p_mobj.c b/src/p_mobj.c index 491436bf8..af896a40e 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -12310,6 +12310,11 @@ static boolean P_SpawnNonMobjMapThing(mapthing_t *mthing) { return true; // These are handled elsewhere. } + else if (mthing->type > MAXPLAYERS && mthing->type <= 32) // be wary of playerstarts size! playerstarts[MAXPLAYERS] + { + CONS_Alert(CONS_WARNING, "Excess player start detected %d\n", mthing->type); + return true; + } return false; }