GBA: Fix Sharkport size check
Vicki Pfau vi@endrift.com
Mon, 17 Aug 2020 17:40:20 -0700
1 files changed,
1 insertions(+),
1 deletions(-)
jump to
M
src/gba/sharkport.c
→
src/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);