From 4c56b9fa714d1bee54666adf7e5e1db5fb398dc7 Mon Sep 17 00:00:00 2001 From: robertphillips Date: Wed, 17 Aug 2016 08:02:51 -0700 Subject: [PATCH] Cast for fuzzer complaint Given the cast in the following else block, this isn't the first time we've encountered this. BUG=637187 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2258463002 Review-Url: https://codereview.chromium.org/2258463002 --- src/gpu/GrSurface.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gpu/GrSurface.cpp b/src/gpu/GrSurface.cpp index 824a6a2936..2da1f25724 100644 --- a/src/gpu/GrSurface.cpp +++ b/src/gpu/GrSurface.cpp @@ -29,7 +29,8 @@ size_t GrSurface::WorseCaseSize(const GrSurfaceDesc& desc) { SkASSERT(!GrPixelConfigIsCompressed(desc.fConfig)); size_t colorBytes = GrBytesPerPixel(desc.fConfig); SkASSERT(colorBytes > 0); - size = colorValuesPerPixel * desc.fWidth * desc.fHeight * colorBytes; + + size = (size_t) colorValuesPerPixel * desc.fWidth * desc.fHeight * colorBytes; } else { if (GrPixelConfigIsCompressed(desc.fConfig)) { size = GrCompressedFormatDataSize(desc.fConfig, desc.fWidth, desc.fHeight);