File ImageMagick-CVE-2023-3745.patch of Package ImageMagick.18189

Index: ImageMagick-7.0.7-34/coders/tiff.c
===================================================================
--- ImageMagick-7.0.7-34.orig/coders/tiff.c
+++ ImageMagick-7.0.7-34/coders/tiff.c
@@ -1769,6 +1769,9 @@ RestoreMSCWarning
     if (image->compression == JPEGCompression)
       method=GetJPEGMethod(image,tiff,photometric,bits_per_sample,
         samples_per_pixel);
+    if ((photometric == PHOTOMETRIC_LOGLUV) ||
+        (photometric == PHOTOMETRIC_YCBCR))
+      method=ReadGenericMethod;
     if (compress_tag == COMPRESSION_JBIG)
       method=ReadStripMethod;
     if (TIFFIsTiled(tiff) != MagickFalse)
openSUSE Build Service is sponsored by