File libraw-CVE-2023-1729.patch of Package libraw.30665

Index: LibRaw-0.15.4/src/libraw_cxx.cpp
===================================================================
--- LibRaw-0.15.4.orig/src/libraw_cxx.cpp
+++ LibRaw-0.15.4/src/libraw_cxx.cpp
@@ -1240,7 +1240,8 @@ void LibRaw::raw2image_start()
             }
 
         // adjust for half mode!
-        IO.shrink = P1.filters && (O.half_size ||
+        IO.shrink = !imgdata.rawdata.color4_image && !imgdata.rawdata.color3_image &&
+	      P1.filters && (O.half_size ||
                                    ((O.threshold || O.aber[0] != 1 || O.aber[2] != 1) ));
         
         S.iheight = (S.height + IO.shrink) >> IO.shrink;
openSUSE Build Service is sponsored by