]> granicus.if.org Git - imagemagick/commitdiff
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6898
authorCristy <urban-warrior@imagemagick.org>
Fri, 16 Mar 2018 16:05:31 +0000 (12:05 -0400)
committerCristy <urban-warrior@imagemagick.org>
Fri, 16 Mar 2018 16:05:31 +0000 (12:05 -0400)
coders/wpg.c

index 8b7b090392a2bfbaf016010220be0c503381444e..749eee924d09561a9f3b9e2e41c0e78707635125 100644 (file)
@@ -1222,13 +1222,13 @@ static Image *ReadWPGImage(const ImageInfo *image_info,
                         image->colormap[1].blue = QuantumRange;
                     }
                 }
-
-              if(UnpackWPGRaster(image,bpp,exception) < 0)
-                /* The raster cannot be unpacked */
-                {
-                DecompressionFailed:
-                  ThrowReaderException(CoderError,"UnableToDecompressImage");
-                    }
+              if(!image_info->ping)
+                if(UnpackWPGRaster(image,bpp,exception) < 0)
+                  /* The raster cannot be unpacked */
+                  {
+                  DecompressionFailed:
+                    ThrowReaderException(CoderError,"UnableToDecompressImage");
+                  }
 
               if(Rec.RecType==0x14 && BitmapHeader2.RotAngle!=0 && !image_info->ping)
                 {