mirror of
https://github.com/libretro/mgba.git
synced 2024-12-18 05:57:12 +00:00
GB, GBA Video: Fix integer overflow
This commit is contained in:
parent
caf59d726f
commit
716a245397
@ -130,7 +130,7 @@ static bool _parsePacket(struct mVideoLogger* logger, const struct mVideoLoggerD
|
||||
}
|
||||
break;
|
||||
case DIRTY_VRAM:
|
||||
if (item->address + 0x1000 <= GB_SIZE_VRAM) {
|
||||
if (item->address <= GB_SIZE_VRAM - 0x1000) {
|
||||
logger->readData(logger, &logger->vram[item->address >> 1], 0x1000, true);
|
||||
proxyRenderer->backend->writeVRAM(proxyRenderer->backend, item->address);
|
||||
}
|
||||
|
@ -142,7 +142,7 @@ static bool _parsePacket(struct mVideoLogger* logger, const struct mVideoLoggerD
|
||||
}
|
||||
break;
|
||||
case DIRTY_VRAM:
|
||||
if (item->address + 0x1000 <= SIZE_VRAM) {
|
||||
if (item->address <= SIZE_VRAM - 0x1000) {
|
||||
logger->readData(logger, &logger->vram[item->address >> 1], 0x1000, true);
|
||||
proxyRenderer->backend->writeVRAM(proxyRenderer->backend, item->address);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user