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

index 9ea2b1780bc6d98ff7cf7b592dc2232802b52c61..2b16c7e1262cb33a435df687058806cea976fe1d 100644 (file)
@@ -589,8 +589,9 @@ static int UnpackWPG2Raster(Image *image,int bpp,ExceptionInfo *exception)
             }
           break;
         case 0x7E:
-          (void) FormatLocaleFile(stderr,
-            "\nUnsupported WPG token XOR, please report!");
+          if (y == 0)
+            (void) FormatLocaleFile(stderr,
+              "\nUnsupported WPG token XOR, please report!");
           XorMe=!XorMe;
           break;
         case 0x7F:
@@ -1434,8 +1435,9 @@ static Image *ReadWPGImage(const ImageInfo *image_info,
                   }
                 case 1:    /*RLE for WPG2 */
                   {
-                    if( UnpackWPG2Raster(image,bpp,exception) < 0)
-                      goto DecompressionFailed;
+                    if (!image->ping)
+                      if( UnpackWPG2Raster(image,bpp,exception) < 0)
+                        goto DecompressionFailed;
                     break;
                   }
                 }