Fix possible out of bounds memory access for M_MapLocked

This commit is contained in:
toaster 2022-12-14 17:30:39 +00:00
parent 6545b693d4
commit c693be47f8

View file

@ -1099,6 +1099,9 @@ boolean M_MapLocked(INT32 mapnum)
// No skipping over any part of your marathon.
if (marathonmode)
return false;
if (!mapnum || mapnum > nummapheaders)
return false;
if (!mapheaderinfo[mapnum-1])
return false;