diff options
-rw-r--r-- | src/core/SkScan_AntiPath.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/SkScan_AntiPath.cpp b/src/core/SkScan_AntiPath.cpp index 9def060..0834caa 100644 --- a/src/core/SkScan_AntiPath.cpp +++ b/src/core/SkScan_AntiPath.cpp @@ -392,10 +392,12 @@ public: return false; #endif int width = bounds.width(); - int rb = SkAlign4(width); + int64_t rb = SkAlign4(width); + // use 64bits to detect overflow + int64_t storage = rb * bounds.height(); return (width <= MaskSuperBlitter::kMAX_WIDTH) && - (rb * bounds.height() <= MaskSuperBlitter::kMAX_STORAGE); + (storage <= MaskSuperBlitter::kMAX_STORAGE); } private: |