File ImageMagick-CVE-2019-12979.patch of Package ImageMagick.13663

diff --git a/MagickCore/image.c b/MagickCore/image.c
index 65e865af55..c089ab3578 100644
--- a/MagickCore/image.c
+++ b/MagickCore/image.c
@@ -258,10 +258,11 @@ MagickExport Image *AcquireImage(const ImageInfo *image_info,
         geometry_info;
 
       flags=ParseGeometry(image_info->density,&geometry_info);
-      image->resolution.x=geometry_info.rho;
-      image->resolution.y=geometry_info.sigma;
-      if ((flags & SigmaValue) == 0)
-        image->resolution.y=image->resolution.x;
+      if ((flags & RhoValue) != 0)
+        image->resolution.x=geometry_info.rho;
+      image->resolution.y=image->resolution.x;
+      if ((flags & SigmaValue) != 0)
+        image->resolution.y=geometry_info.sigma;
     }
   if (image_info->page != (char *) NULL)
     {

openSUSE Build Service is sponsored by