File libraw-CVE-2020-22628.patch of Package libraw.38397

Index: LibRaw-0.18.9/internal/dcraw_common.cpp
===================================================================
--- LibRaw-0.18.9.orig/internal/dcraw_common.cpp
+++ LibRaw-0.18.9/internal/dcraw_common.cpp
@@ -15624,7 +15624,7 @@ dng_skip:
       || tiff_samples > 6 || colors > 4)
     is_raw = 0;
 
-  if(raw_width < 22 || raw_width > 64000 || raw_height < 22 || raw_width > 64000)
+  if(raw_width < 22 || raw_width > 64000 || raw_height < 22 || raw_width > 64000 || pixel_aspect < 0.1 || pixel_aspect > 10)
     is_raw = 0;
 
 #ifdef NO_JASPER
openSUSE Build Service is sponsored by