mirror of https://github.com/mgba-emu/mgba.git
GBA: Disable more checks when loading GS save with checks disabled (fixes #1851)
This commit is contained in:
parent
26427cf437
commit
5c1249f350
1
CHANGES
1
CHANGES
|
@ -39,6 +39,7 @@ Other fixes:
|
|||
- Debugger: Don't skip undefined instructions when debugger attached
|
||||
- FFmpeg: Fix some small memory leaks
|
||||
- FFmpeg: Fix encoding of time base
|
||||
- GBA: Disable more checks when loading GS save with checks disabled (fixes mgba.io/i/1851)
|
||||
- Qt: Force OpenGL paint engine creation thread (fixes mgba.io/i/1642)
|
||||
- Qt: Fix static compilation in MinGW (fixes mgba.io/i/1769)
|
||||
- Qt: Fix a race condition in the frame inspector
|
||||
|
|
|
@ -69,7 +69,7 @@ bool GBASavedataImportSharkPort(struct GBA* gba, struct VFile* vf, bool testChec
|
|||
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);
|
||||
|
@ -91,7 +91,7 @@ bool GBASavedataImportSharkPort(struct GBA* gba, struct VFile* vf, bool testChec
|
|||
buffer.c[0x19] = 0;
|
||||
buffer.c[0x1A] = 0;
|
||||
buffer.c[0x1B] = 0;
|
||||
if (memcmp(buffer.c, payload, 0x1C) != 0) {
|
||||
if (memcmp(buffer.c, payload, testChecksum ? 0x1C : 0xF) != 0) {
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue