From: Cristy Date: Sat, 25 Aug 2018 23:04:11 +0000 (-0400) Subject: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10005 X-Git-Tag: 7.0.8-11~29 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f0056ff3bc19fa8f27ec216431df22c945ddb289;p=imagemagick https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10005 --- diff --git a/MagickCore/property.c b/MagickCore/property.c index 4c63bfa7d..9a39477a8 100644 --- a/MagickCore/property.c +++ b/MagickCore/property.c @@ -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)