| Index: src/core/SkScaledImageCache.cpp
|
| diff --git a/src/core/SkScaledImageCache.cpp b/src/core/SkScaledImageCache.cpp
|
| index f266f97171533f3c3a66978f6a300520f3e085af..a030248197a391787c62e0b46f96fb9f199202a2 100644
|
| --- a/src/core/SkScaledImageCache.cpp
|
| +++ b/src/core/SkScaledImageCache.cpp
|
| @@ -266,7 +266,8 @@ private:
|
| bool SkScaledImageCacheDiscardableAllocator::allocPixelRef(SkBitmap* bitmap,
|
| SkColorTable* ctable) {
|
| size_t size = bitmap->getSize();
|
| - if (0 == size) {
|
| + uint64_t size64 = bitmap->computeSize64();
|
| + if (0 == size || size64 > (uint64_t)size) {
|
| return false;
|
| }
|
|
|
|
|