Index: src/images/SkImageDecoder_libico.cpp |
diff --git a/src/images/SkImageDecoder_libico.cpp b/src/images/SkImageDecoder_libico.cpp |
index 90058d679af3ae2450d827a2bc8e212ab5183b4c..71e1d4132790978e3c0aeb0f9ab6454e158d0e88 100644 |
--- a/src/images/SkImageDecoder_libico.cpp |
+++ b/src/images/SkImageDecoder_libico.cpp |
@@ -154,7 +154,7 @@ bool SkICOImageDecoder::onDecode(SkStream* stream, SkBitmap* bm, Mode mode) |
//int fakeBitCount = read2Bytes(buf, 12 + choice*16); //should be real - usually 0 |
const size_t size = read4Bytes(buf, 14 + choice*16); //matters? |
const size_t offset = read4Bytes(buf, 18 + choice*16); |
- if ((offset + size) > length) { |
+ if (((uint64_t)offset + size) > length) { |
reed1
2014/08/26 14:48:23
I suggest a comment to explain why we're using the
|
return false; |
} |