From a301f2cd2a4c0604c817af9aa5ae3e91faa2afdc Mon Sep 17 00:00:00 2001 From: Cristy Date: Tue, 30 Jan 2018 14:40:29 -0500 Subject: [PATCH] https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=5838 --- MagickCore/geometry.c | 6 ++++-- configure | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/MagickCore/geometry.c b/MagickCore/geometry.c index 7cfc8cd02..87e664273 100644 --- a/MagickCore/geometry.c +++ b/MagickCore/geometry.c @@ -1498,8 +1498,10 @@ MagickExport MagickStatusType ParseMetaGeometry(const char *geometry,ssize_t *x, scale.y=(double) former_height*PerceptibleReciprocal(distance/sqrt(area)); if ((scale.x < (double) *width) || (scale.y < (double) *height)) { - *width=(unsigned long) (former_width/(distance/sqrt(area))); - *height=(unsigned long) (former_height/(distance/sqrt(area))); + *width=(unsigned long) (former_width*PerceptibleReciprocal( + distance/sqrt(area))); + *height=(unsigned long) (former_height*PerceptibleReciprocal( + distance/sqrt(area))); } former_width=(*width); former_height=(*height); diff --git a/configure b/configure index ac6cb4654..51eb2bd88 100755 --- a/configure +++ b/configure @@ -4550,7 +4550,7 @@ MAGICK_PATCHLEVEL_VERSION=23 MAGICK_VERSION=7.0.7-23 -MAGICK_GIT_REVISION=22562:23246df8d:20180130 +MAGICK_GIT_REVISION=22573:84ae5bdb7:20180130 # Substitute library versioning -- 2.40.0