]> granicus.if.org Git - imagemagick/commitdiff
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7263
authorCristy <urban-warrior@imagemagick.org>
Sun, 1 Apr 2018 12:54:17 +0000 (08:54 -0400)
committerCristy <urban-warrior@imagemagick.org>
Sun, 1 Apr 2018 12:54:17 +0000 (08:54 -0400)
coders/webp.c

index 22f662bae40cf48348966475db6d4f7e219704ed..58693d9f4ef4e4cf63c2a64233e585d066013852 100644 (file)
@@ -298,8 +298,6 @@ static Image *ReadWEBPImage(const ImageInfo *image_info,
       image->depth=8;
       image->alpha_trait=features->has_alpha != 0 ? BlendPixelTrait :
         UndefinedPixelTrait;
-      if (IsWEBPImageLossless(stream,length) != MagickFalse)
-        image->quality=100;
       if (image_info->ping != MagickFalse)
         {
           stream=(unsigned char*) RelinquishMagickMemory(stream);
@@ -313,6 +311,8 @@ static Image *ReadWEBPImage(const ImageInfo *image_info,
           (void) CloseBlob(image);
           return(DestroyImageList(image));
         }
+      if (IsWEBPImageLossless(stream,length) != MagickFalse)
+        image->quality=100;
       webp_status=WebPDecode(stream,length,&configure);
     }
   if (webp_status != VP8_STATUS_OK)