From: Cristy Date: Fri, 25 Oct 2019 15:56:55 +0000 (-0400) Subject: https://github.com/ImageMagick/ImageMagick/issues/1763 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=083192d446e6c9d65a35123424e5d21dd9a69d36;p=imagemagick https://github.com/ImageMagick/ImageMagick/issues/1763 --- diff --git a/coders/ps.c b/coders/ps.c index af69804c2..5981d925c 100644 --- a/coders/ps.c +++ b/coders/ps.c @@ -628,9 +628,9 @@ static Image *ReadPSImage(const ImageInfo *image_info,ExceptionInfo *exception) info.bounds.x1,info.bounds.y1); (void) SetImageProperty(image,"ps:HiResBoundingBox",geometry,exception); page.width=(size_t) ceil((double) ((info.bounds.x2-info.bounds.x1)* - resolution.x/delta.x)-0.5); + MagickMax(resolution.x/delta.x,0.0))-0.5); page.height=(size_t) ceil((double) ((info.bounds.y2-info.bounds.y1)* - resolution.y/delta.y)-0.5); + MagickMax(resolution.y/delta.y,0.0))-0.5); } fitPage=MagickFalse; option=GetImageOption(image_info,"eps:fit-page");