Add an extra guard for unlock condition string drawing to prevent hypothetical out of bounds read

This commit is contained in:
toaster 2023-01-04 17:52:28 +00:00
parent 6274b1f31f
commit c628014c47

View file

@ -4950,6 +4950,7 @@ challengedesc:
i = (challengesmenu.hilix * CHALLENGEGRIDHEIGHT) + challengesmenu.hiliy;
if (challengesmenu.unlockcondition != NULL
&& challengesmenu.currentunlock < MAXUNLOCKABLES
&& ((gamedata->unlocked[challengesmenu.currentunlock] == true)
|| ((challengesmenu.extradata != NULL)
&& (challengesmenu.extradata[i] & CHE_HINT))