diff options
author | Adrian Frühwirth | 2018-02-25 16:21:29 +0100 |
---|---|---|
committer | Adrian Frühwirth | 2018-02-25 16:21:37 +0100 |
commit | 9f1f5057c99e3f5e2b196d7da9995d8fd8fcaae1 (patch) | |
tree | 6ccd63d1fa412774edeaa8d43fee0acb8c075619 | |
parent | ce48271a59e7450df8a4f9853a65582e8d54bc64 (diff) | |
download | scummvm-rg350-9f1f5057c99e3f5e2b196d7da9995d8fd8fcaae1.tar.gz scummvm-rg350-9f1f5057c99e3f5e2b196d7da9995d8fd8fcaae1.tar.bz2 scummvm-rg350-9f1f5057c99e3f5e2b196d7da9995d8fd8fcaae1.zip |
TUCKER: Fix theoretical out-of-bounds read
-rw-r--r-- | engines/tucker/graphics.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/tucker/graphics.cpp b/engines/tucker/graphics.cpp index 7b17bd0252..3a6bd227b4 100644 --- a/engines/tucker/graphics.cpp +++ b/engines/tucker/graphics.cpp @@ -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 { |