mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-16 14:50:17 +00:00
TUCKER: Fix theoretical out-of-bounds read
This commit is contained in:
parent
ce48271a59
commit
9f1f5057c9
@ -122,7 +122,7 @@ void Graphics::decodeRLE_248(uint8 *dst, const uint8 *src, int w, int h, int y1,
|
||||
}
|
||||
}
|
||||
if (color != 0) {
|
||||
if (( (whitelistReservedColors != nullptr && (*(whitelistReservedColors + dst[offset] - 0xE0) == 1) && dst[offset] <= 0xEF) || dst[offset] < 0xE0 || y + y1 < y2) && dst[offset] < 0xF8) {
|
||||
if (( (whitelistReservedColors != nullptr && (dst[offset] & 0xE0) == 0xE0 && *(whitelistReservedColors + dst[offset] - 0xE0) == 1) || dst[offset] < 0xE0 || y + y1 < y2) && dst[offset] < 0xF8) {
|
||||
dst[offset] = color;
|
||||
}
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user