diff options
author | Leon Scroggins III <scroggo@google.com> | 2017-02-07 16:42:52 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2017-02-07 16:42:52 +0000 |
commit | 09ad23b21edf1ffea31abe4a4d9ae5d8a1142748 (patch) | |
tree | 63e59e1ba224b9dc4ff89580f7682afab37af562 | |
parent | af0ec8be938cc37513c0ac9b98dcdb9db92862f6 (diff) | |
parent | c9b947def73427267ca9503784c337e74f8fa5e4 (diff) | |
download | skia-09ad23b21edf1ffea31abe4a4d9ae5d8a1142748.tar.gz |
Fix out of bounds memory read in GIFMovie.cpp am: 16882f7212 am: d2456e3a12 am: ffc0958605 am: df18259ff1
am: c9b947def7
Change-Id: I2d4260fe92c73f91af0dfd5e4c7665b9b2d33095
-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 40e5520def..49660823f8 100644 --- a/src/images/SkMovie_gif.cpp +++ b/src/images/SkMovie_gif.cpp @@ -120,7 +120,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); } |