all repos — mgba @ 49b16f3d9b9fe0e04487764bc374d31ccb11fa81

mGBA Game Boy Advance Emulator

GBA: Improve multiboot detection
Jeffrey Pfau jeffrey@endrift.com
Tue, 10 Nov 2015 22:41:51 -0800
commit

49b16f3d9b9fe0e04487764bc374d31ccb11fa81

parent

fe8c632c78eba9584354e79ab1c0a4008275e53a

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

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

@@ -727,6 +727,9 @@ bool GBAIsMB(struct VFile* vf) {

if (!GBAIsROM(vf)) { return false; } + if (vf->size(vf) > SIZE_WORKING_RAM) { + return false; + } if (vf->seek(vf, GBA_MB_MAGIC_OFFSET, SEEK_SET) < 0) { return false; }