all repos — mgba @ 37ef9c6d83ec080c00fc9858856b998bef8b185e

mGBA Game Boy Advance Emulator

GBA: Fix Sharkport size check
Vicki Pfau vi@endrift.com
Mon, 17 Aug 2020 17:40:20 -0700
commit

37ef9c6d83ec080c00fc9858856b998bef8b185e

parent

a6885fdbd3e32d8156704e755bde73eb5ec5d293

1 files changed, 1 insertions(+), 1 deletions(-)

jump to
M src/gba/sharkport.csrc/gba/sharkport.c

@@ -69,7 +69,7 @@ if (vf->read(vf, &buffer.i, 4) < 4) {

return false; } LOAD_32(size, 0, &buffer.i); - if (size < 0x1C || size >= SIZE_CART_FLASH1M + 0x1C) { + if (size < 0x1C || size > SIZE_CART_FLASH1M + 0x1C) { return false; } char* payload = malloc(size);