]> granicus.if.org Git - imagemagick/commitdiff
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6385
authorCristy <urban-warrior@imagemagick.org>
Thu, 15 Feb 2018 16:16:19 +0000 (11:16 -0500)
committerCristy <urban-warrior@imagemagick.org>
Thu, 15 Feb 2018 16:16:19 +0000 (11:16 -0500)
MagickCore/property.c

index 508a8b43277ff280e73d41558bb6f7f420ad41cb..5ad1110b3d5bd95a57f2667aa05da96c8b845f06 100644 (file)
@@ -4165,10 +4165,11 @@ MagickExport MagickBooleanType SetImageProperty(Image *image,
             geometry_info;
 
           flags=ParseGeometry(value,&geometry_info);
-          image->resolution.x=geometry_info.rho;
-          image->resolution.y=geometry_info.sigma;
-          if ((flags & SigmaValue) == 0)
-            image->resolution.y=image->resolution.x;
+          if ((flags & RhoValue) != 0)
+            image->resolution.x=geometry_info.rho;
+          image->resolution.y=image->resolution.x;
+          if ((flags & SigmaValue) != 0)
+            image->resolution.y=geometry_info.sigma;
           return(MagickTrue);
         }
       if (LocaleCompare("depth",property) == 0)