From fd387b5f1cd8c4e016fb3a87ac544eb848998c11 Mon Sep 17 00:00:00 2001 From: Cristy Date: Tue, 6 Mar 2018 20:12:35 -0500 Subject: [PATCH] https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=5558 --- MagickCore/draw.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/MagickCore/draw.c b/MagickCore/draw.c index 617789044..6c57fc95b 100644 --- a/MagickCore/draw.c +++ b/MagickCore/draw.c @@ -4128,17 +4128,17 @@ RestoreMSCWarning bounds.y2=p->bounds.y2; } bounds.x1-=(mid+1.0); - bounds.x1=bounds.x1 < 0.0 ? 0.0 : (size_t) ceil(bounds.x1-0.5) >= - image->columns ? (double) image->columns-1 : bounds.x1; + bounds.x1=bounds.x1 < 0.0 ? 0.0 : bounds.x1 >= (double) image->columns-1.0 ? + (double) image->columns-1.0 : bounds.x1; bounds.y1-=(mid+1.0); - bounds.y1=bounds.y1 < 0.0 ? 0.0 : (size_t) ceil(bounds.y1-0.5) >= - image->rows ? (double) image->rows-1 : bounds.y1; + bounds.y1=bounds.y1 < 0.0 ? 0.0 : bounds.y1 >= (double) image->rows-1.0 ? + (double) image->rows-1.0 : bounds.y1; bounds.x2+=(mid+1.0); - bounds.x2=bounds.x2 < 0.0 ? 0.0 : (size_t) floor(bounds.x2+0.5) >= - image->columns ? (double) image->columns-1 : bounds.x2; + bounds.x2=bounds.x2 < 0.0 ? 0.0 : bounds.x2 >= (double) image->columns-1.0 ? + (double) image->columns-1.0 : bounds.x2; bounds.y2+=(mid+1.0); - bounds.y2=bounds.y2 < 0.0 ? 0.0 : (size_t) floor(bounds.y2+0.5) >= - image->rows ? (double) image->rows-1 : bounds.y2; + bounds.y2=bounds.y2 < 0.0 ? 0.0 : bounds.y2 >= (double) image->rows-1.0 ? + (double) image->rows-1.0 : bounds.y2; status=MagickTrue; image_view=AcquireAuthenticCacheView(image,exception); if ((primitive_info->coordinates == 1) || -- 2.40.0