From c32cba466f3f58a6d6f5ebbbaf0297f6617480ba Mon Sep 17 00:00:00 2001 From: Cristy Date: Sat, 3 Feb 2018 08:29:23 -0500 Subject: [PATCH] https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=5900 --- MagickCore/geometry.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MagickCore/geometry.c b/MagickCore/geometry.c index f276861ee..8f925e2e5 100644 --- a/MagickCore/geometry.c +++ b/MagickCore/geometry.c @@ -1400,7 +1400,7 @@ MagickExport MagickStatusType ParseMetaGeometry(const char *geometry,ssize_t *x, */ (void) ParseGeometry(geometry,&geometry_info); geometry_ratio=geometry_info.rho; - image_ratio=(double) former_width/former_height; + image_ratio=(double) former_width*PerceptibleReciprocal(former_height); if (geometry_ratio >= image_ratio) { *width=former_width; -- 2.40.0