diff options
author | Leon Scroggins III <scroggo@google.com> | 2017-02-07 16:51:24 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2017-02-07 16:51:24 +0000 |
commit | 8b8fbb1e9cd0b7ea974e9a4743574ae8efae4498 (patch) | |
tree | 8843f141595107e8fe14f8f2400c16a829a114cc | |
parent | 21f2db467a62ff0152bf9bf09cee27199d6c4631 (diff) | |
parent | d80a31cff800481a4690a171e6ca1d25f8086fd1 (diff) | |
download | skia-8b8fbb1e9cd0b7ea974e9a4743574ae8efae4498.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
am: d80a31cff8
Change-Id: I9a85bcf858eb942199a23d96207266e3aadf39ef
-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); } |