diff options
author | Tauwasser <tauwasser@tauwasser.eu> | 2017-06-09 05:48:14 +0200 |
---|---|---|
committer | Tauwasser <tauwasser@tauwasser.eu> | 2017-06-21 15:27:40 +0200 |
commit | e80736439430fc988d70520d4bda4615987c7745 (patch) | |
tree | 59be948450e5736a558cdb3884c1347c2cb45857 | |
parent | 8345e439f1567117122f70ec76051551bb8757f8 (diff) |
gameboy: remove buffer over-read in get_cart_type
Signed-off-by: Tauwasser <tauwasser@tauwasser.eu>
-rw-r--r-- | src/devices/bus/gameboy/gb_slot.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/devices/bus/gameboy/gb_slot.cpp b/src/devices/bus/gameboy/gb_slot.cpp index 9a7b8168269..7fbe8aaf49c 100644 --- a/src/devices/bus/gameboy/gb_slot.cpp +++ b/src/devices/bus/gameboy/gb_slot.cpp @@ -552,6 +552,7 @@ int gb_cart_slot_device_base::get_cart_type(const uint8_t *ROM, uint32_t len) // Check for some unlicensed games //if (type == GB_MBC_MBC5) + if (len >= 0x184 + 0x30) { int count = 0; for (int i = 0x0184; i < 0x0184 + 0x30; i++) |