diff options
author | Leon Scroggins III <scroggo@google.com> | 2017-02-07 16:49:23 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2017-02-07 16:49:23 +0000 |
commit | d80a31cff800481a4690a171e6ca1d25f8086fd1 (patch) | |
tree | a28b1624fe6165faf03f4ad85b4dc4269a673835 | |
parent | ecbbc7d04216d558f52e2a57f8606176171b557b (diff) | |
parent | d1fb426850d72867298383bf029862acc9d52598 (diff) | |
download | skia-d80a31cff800481a4690a171e6ca1d25f8086fd1.tar.gz |
Fix out of bounds memory read in GIFMovie.cpp am: 16882f7212 am: d2456e3a12 am: ffc0958605 am: df18259ff1 am: c9b947def7 am: 09ad23b21e am: 716de6b276
am: d1fb426850
Change-Id: I3bbc083f9f866642c78f02eabd801f789ac9ac2d
-rw-r--r-- | src/images/SkMovie_gif.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/images/SkMovie_gif.cpp b/src/images/SkMovie_gif.cpp index 103107961b..b4d73a9705 100644 --- a/src/images/SkMovie_gif.cpp +++ b/src/images/SkMovie_gif.cpp @@ -122,7 +122,7 @@ static void copyLine(uint32_t* dst, const unsigned char* src, const ColorMapObje int transparent, int width) { for (; width > 0; width--, src++, dst++) { - if (*src != transparent) { + if (*src != transparent && *src < cmap->ColorCount) { const GifColorType& col = cmap->Colors[*src]; *dst = SkPackARGB32(0xFF, col.Red, col.Green, col.Blue); } |