]> granicus.if.org Git - imagemagick/commitdiff
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=5710
authorCristy <urban-warrior@imagemagick.org>
Sat, 27 Jan 2018 16:11:00 +0000 (11:11 -0500)
committerCristy <urban-warrior@imagemagick.org>
Sat, 27 Jan 2018 16:11:00 +0000 (11:11 -0500)
coders/wpg.c

index eb4f54766ae2cb299f587c1c5621601cd5ffbc81..e57a5d5f952e1234ffee3d5cc3ee21b7c5eb54be 100644 (file)
@@ -1163,6 +1163,7 @@ static Image *ReadWPGImage(const ImageInfo *image_info,
               status=SetImageExtent(image,image->columns,image->rows,exception);
               if (status == MagickFalse)
                 break;
+              (void) SetImageBackgroundColor(image,exception);
               if ((image->storage_class != PseudoClass) && (bpp < 24))
                 {
                   image->colors=one << bpp;
@@ -1363,6 +1364,7 @@ static Image *ReadWPGImage(const ImageInfo *image_info,
               status=SetImageExtent(image,image->columns,image->rows,exception);
               if (status == MagickFalse)
                 break;
+              (void) SetImageBackgroundColor(image,exception);
               if ((image->colors == 0) && (bpp != 24))
                 {
                   image->colors=one << bpp;