]> granicus.if.org Git - imagemagick/commitdiff
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10005
authorCristy <urban-warrior@imagemagick.org>
Sat, 25 Aug 2018 23:04:11 +0000 (19:04 -0400)
committerCristy <urban-warrior@imagemagick.org>
Sat, 25 Aug 2018 23:04:11 +0000 (19:04 -0400)
MagickCore/property.c

index 4c63bfa7d09de3659e51841d05f30083f0289c30..9a39477a880af0201152829474c144bb8204252c 100644 (file)
@@ -3110,14 +3110,16 @@ MagickExport const char *GetMagickProperty(ImageInfo *image_info,
         {
           WarnNoImageReturn("\"%%[%s]\"",property);
           (void) FormatLocaleString(value,MagickPathExtent,"%.*g",
-            GetMagickPrecision(),image->columns/image->resolution.x);
+            GetMagickPrecision(),PerceptibleReciprocal(image->resolution.x)*
+              image->columns);
           break;
         }
       if (LocaleCompare("printsize.y",property) == 0)
         {
           WarnNoImageReturn("\"%%[%s]\"",property);
           (void) FormatLocaleString(value,MagickPathExtent,"%.*g",
-            GetMagickPrecision(),image->rows/image->resolution.y);
+            GetMagickPrecision(),PerceptibleReciprocal(image->resolution.y)*
+              image->rows);
           break;
         }
       if (LocaleCompare("profiles",property) == 0)