diff --git a/CHANGES b/CHANGES index ce88d9a77..231f24112 100644 --- a/CHANGES +++ b/CHANGES @@ -47,6 +47,7 @@ Bugfixes: - Qt: Fix patch loading while a game is running - Util: Fix sockets on Windows - Qt: Fix crash when loading a game after stopping GDB server + - GBA BIOS: Fix BIOS decompression routines with invalid source addresses Misc: - GBA Audio: Change internal audio sample buffer from 32-bit to 16-bit samples - GBA Memory: Simplify memory API and use fixed bus width diff --git a/src/gba/bios.c b/src/gba/bios.c index 44959d49e..5a42baeff 100644 --- a/src/gba/bios.c +++ b/src/gba/bios.c @@ -233,6 +233,7 @@ void GBASwi16(struct ARMCore* cpu, int immediate) { case 0x12: if (cpu->gprs[0] < BASE_WORKING_RAM) { GBALog(gba, GBA_LOG_GAME_ERROR, "Bad LZ77 source"); + break; } switch (cpu->gprs[1] >> BASE_OFFSET) { default: @@ -247,6 +248,7 @@ void GBASwi16(struct ARMCore* cpu, int immediate) { case 0x13: if (cpu->gprs[0] < BASE_WORKING_RAM) { GBALog(gba, GBA_LOG_GAME_ERROR, "Bad Huffman source"); + break; } switch (cpu->gprs[1] >> BASE_OFFSET) { default: @@ -262,6 +264,7 @@ void GBASwi16(struct ARMCore* cpu, int immediate) { case 0x15: if (cpu->gprs[0] < BASE_WORKING_RAM) { GBALog(gba, GBA_LOG_GAME_ERROR, "Bad RL source"); + break; } switch (cpu->gprs[1] >> BASE_OFFSET) { default: @@ -278,6 +281,7 @@ void GBASwi16(struct ARMCore* cpu, int immediate) { case 0x18: if (cpu->gprs[0] < BASE_WORKING_RAM) { GBALog(gba, GBA_LOG_GAME_ERROR, "Bad UnFilter source"); + break; } switch (cpu->gprs[1] >> BASE_OFFSET) { default: