From 99a2330ccffb1eb0234f62871122e8414150e146 Mon Sep 17 00:00:00 2001 From: Cristy Date: Sun, 1 Apr 2018 11:18:13 -0400 Subject: [PATCH] https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7268 --- coders/webp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/coders/webp.c b/coders/webp.c index 273fa98dd..3b57d450a 100644 --- a/coders/webp.c +++ b/coders/webp.c @@ -757,11 +757,11 @@ static MagickBooleanType WriteWEBPImage(const ImageInfo *image_info, break; for (x=0; x < (ssize_t) image->columns; x++) { - *q++=(uint32_t) (image->alpha_trait != UndefinedPixelTrait ? + *q++=(uint32_t) (image->alpha_trait != UndefinedPixelTrait ? (uint32_t) ScaleQuantumToChar(GetPixelAlpha(image,p)) << 24 : 0xff000000) | - (ScaleQuantumToChar(GetPixelRed(image,p)) << 16) | - (ScaleQuantumToChar(GetPixelGreen(image,p)) << 8) | - (ScaleQuantumToChar(GetPixelBlue(image,p))); + ((uint32_t) ScaleQuantumToChar(GetPixelRed(image,p)) << 16) | + ((uint32_t) ScaleQuantumToChar(GetPixelGreen(image,p)) << 8) | + ((uint32_t) ScaleQuantumToChar(GetPixelBlue(image,p))); p+=GetPixelChannels(image); } status=SetImageProgress(image,SaveImageTag,(MagickOffsetType) y, -- 2.40.0