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

diff --git a/magick/image.c b/magick/image.c
index a295bc2a5..721925aef 100644
--- a/magick/image.c
+++ b/magick/image.c
@@ -252,10 +252,11 @@ MagickExport Image *AcquireImage(const ImageInfo *image_info)
         geometry_info;
 
       flags=ParseGeometry(image_info->density,&geometry_info);
-      image->x_resolution=geometry_info.rho;
-      image->y_resolution=geometry_info.sigma;
-      if ((flags & SigmaValue) == 0)
-        image->y_resolution=image->x_resolution;
+      if ((flags & RhoValue) != 0)
+        image->x_resolution=geometry_info.rho;
+      image->y_resolution=image->x_resolution;
+      if ((flags & SigmaValue) != 0)
+        image->y_resolution=geometry_info.sigma;
     }
   if (image_info->page != (char *) NULL)
     {
openSUSE Build Service is sponsored by