aboutsummaryrefslogtreecommitdiff
path: root/image
diff options
context:
space:
mode:
authorEugene Sandulenko2016-05-31 13:25:51 +0200
committerEugene Sandulenko2016-05-31 17:12:18 +0200
commit12f10a22643a0973422b3cb0ecfc2f5bd1428346 (patch)
tree334b3472dcf7ecddd2a840bb2de5cafda07c6a81 /image
parent3b5236c9dee1a14c231b5622582eb9bc87b897a3 (diff)
downloadscummvm-rg350-12f10a22643a0973422b3cb0ecfc2f5bd1428346.tar.gz
scummvm-rg350-12f10a22643a0973422b3cb0ecfc2f5bd1428346.tar.bz2
scummvm-rg350-12f10a22643a0973422b3cb0ecfc2f5bd1428346.zip
IMAGE: Fix out of bounds access
Diffstat (limited to 'image')
-rw-r--r--image/codecs/cinepak.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/image/codecs/cinepak.cpp b/image/codecs/cinepak.cpp
index 4e858921ee..2b02fc8127 100644
--- a/image/codecs/cinepak.cpp
+++ b/image/codecs/cinepak.cpp
@@ -260,7 +260,7 @@ private:
}
static inline byte getRGBLookupEntry(const byte *colorMap, uint16 index) {
- return colorMap[s_defaultPaletteLookup[CLIP<int>(index, 0, 1024)]];
+ return colorMap[s_defaultPaletteLookup[CLIP<int>(index, 0, 1023)]];
}
};