Index: src/core/SkMallocPixelRef.cpp |
diff --git a/src/core/SkMallocPixelRef.cpp b/src/core/SkMallocPixelRef.cpp |
index 9e2ea9c9803c6475b02263325a9bc2fbbc958726..b65197fac852ae7e5dceb3bf4ed4764dc92cd087 100644 |
--- a/src/core/SkMallocPixelRef.cpp |
+++ b/src/core/SkMallocPixelRef.cpp |
@@ -64,12 +64,13 @@ |
rowBytes = minRB; |
} |
- int64_t bigSize = (int64_t)info.fHeight * rowBytes; |
- if (!sk_64_isS32(bigSize)) { |
+ Sk64 bigSize; |
+ bigSize.setMul(info.fHeight, rowBytes); |
+ if (!bigSize.is32()) { |
return NULL; |
} |
- size_t size = sk_64_asS32(bigSize); |
+ size_t size = bigSize.get32(); |
void* addr = sk_malloc_flags(size, 0); |
if (NULL == addr) { |
return NULL; |