File ImageMagick-CVE-2022-32546.patch of Package ImageMagick

Index: ImageMagick-7.0.7-34/coders/pcl.c
===================================================================
--- ImageMagick-7.0.7-34.orig/coders/pcl.c
+++ ImageMagick-7.0.7-34/coders/pcl.c
@@ -294,8 +294,8 @@ static Image *ReadPCLImage(const ImageIn
     /*
       Set PCL render geometry.
     */
-    width=(size_t) floor(bounds.x2-bounds.x1+0.5);
-    height=(size_t) floor(bounds.y2-bounds.y1+0.5);
+    width=(size_t)CastDoubleToLong(floor(bounds.x2-bounds.x1+0.5));
+    height=(size_t)CastDoubleToLong(floor(bounds.y2-bounds.y1+0.5));
     if (width > page.width)
       page.width=width;
     if (height > page.height)
openSUSE Build Service is sponsored by