From 4382cb84e27a98b6784d2962fc2ea3d38db7ecfa Mon Sep 17 00:00:00 2001 From: Logan McNaughton <848146+loganmc10@users.noreply.github.com> Date: Sat, 27 Jan 2024 15:34:19 -0700 Subject: [PATCH] update core --- mupen64plus-core/data/mupen64plus.ini | 22 +++++++++++++++++++ mupen64plus-core/src/api/frontend.c | 3 ++- .../device/r4300/new_dynarec/new_dynarec.c | 2 +- 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/mupen64plus-core/data/mupen64plus.ini b/mupen64plus-core/data/mupen64plus.ini index 70ed679..a880b1d 100644 --- a/mupen64plus-core/data/mupen64plus.ini +++ b/mupen64plus-core/data/mupen64plus.ini @@ -5079,6 +5079,11 @@ SaveType=SRAM Players=4 Rumble=Yes +[20F5EEEE849DB44146AAFB1B97A857F6] +GoodName=F-ZERO X (U) [T+Por0.99_byftr] +CRC=485256FF CF6DF912 +RefMD5=753437D0D8ADA1D12F3F9CF0F0A5171F + [3AE32658B839FFA3189E3CA84E0B884A] GoodName=F-ZERO X (U) [f1] (Sex V1.0 Hack) CRC=7E399849 03DAC1CD @@ -5769,6 +5774,11 @@ Players=4 Mempak=Yes Rumble=Yes +[0AC7A16F8AFCC03031835C89D095D7B9] +GoodName=Getter Love!! (J) [T+Eng1.01_ozidual] +CRC=CDDB4BDF 84E5EFAC +RefMD5=5270D98F9E67DC7EF354ECE109C2A18F + [3BE170E7E94A03BD4E36732EB137EE39] GoodName=Getter Love!! (J) [b1] CRC=489C84E6 4C6E49F9 @@ -6070,6 +6080,13 @@ GoodName=GoldenEye X CRC=E8B3F63D E5A997B1 RefMD5=E03B088B6AC9E0080440EFED07C1E40F +[EA0E3E6AEFA58738A12906298373218B] +GoodName=GoldenEye 007 (UE) (Switch Online) [!] +CRC=DCBC50D1 9FD1AA3 +Players=4 +SaveType=Eeprom 4KB +Rumble=Yes + [9B8A7541D0234F4D97004ECBC216D9C2] GoodName=HIPTHRUST by MooglyGuy (PD) CRC=88A12FB3 8A583CBD @@ -6176,6 +6193,11 @@ GoodName=Heiwa Pachinko World 64 (J) [!] CRC=3E70E866 4438BAE8 Players=1 +[78E2ED1DB5F90E2EA9C04771B27685BC] +GoodName=Heiwa Pachinko World 64 (J) [T+Eng1.0_Zoinkity] +CRC=3AE679E2 1A3C42DB +RefMD5=5E8539E037EEA88C5A2746F60E431C8D + [9D0D85E3A0C94B98D6404E8FC28E7B01] GoodName=Heiwa Pachinko World 64 (J) [b1] CRC=3E70E866 4438BAE8 diff --git a/mupen64plus-core/src/api/frontend.c b/mupen64plus-core/src/api/frontend.c index 107c7af..60c7c28 100644 --- a/mupen64plus-core/src/api/frontend.c +++ b/mupen64plus-core/src/api/frontend.c @@ -180,7 +180,8 @@ EXPORT m64p_error CALL CoreDoCommand(m64p_command Command, int ParamInt, void *P case M64CMD_ROM_OPEN: if (g_EmulatorRunning || l_DiskOpen || l_ROMOpen) return M64ERR_INVALID_STATE; - if (ParamPtr == NULL || ParamInt < 4096) + // ROM buffer size must be divisible by 4 to avoid out-of-bounds read in swap_copy_rom (v64/n64 formats) + if (ParamPtr == NULL || ParamInt < 4096 || ParamInt > CART_ROM_MAX_SIZE || ParamInt % 4 != 0) return M64ERR_INPUT_ASSERT; rval = open_rom((const unsigned char *) ParamPtr, ParamInt); if (rval == M64ERR_SUCCESS) diff --git a/mupen64plus-core/src/device/r4300/new_dynarec/new_dynarec.c b/mupen64plus-core/src/device/r4300/new_dynarec/new_dynarec.c index a9f8b92..f28c484 100644 --- a/mupen64plus-core/src/device/r4300/new_dynarec/new_dynarec.c +++ b/mupen64plus-core/src/device/r4300/new_dynarec/new_dynarec.c @@ -22,10 +22,10 @@ #include #include #include +#include // needed for u_int, u_char, etc #include #if defined(__APPLE__) -#include // needed for u_int, u_char, etc #define MAP_ANONYMOUS MAP_ANON #endif