File libraw-CVE-2018-5816.patch of Package libraw.16434
diff --git a/internal/dcraw_common.cpp b/internal/dcraw_common.cpp
index 041318c5..7cb6c15c 100644
--- a/internal/dcraw_common.cpp
+++ b/internal/dcraw_common.cpp
@@ -14399,7 +14399,10 @@ void CLASS identify()
#endif
switch (tiff_bps = i*8 / (width * height)) {
case 8: load_raw = &CLASS eight_bit_load_raw; break;
- case 10: load_raw = &CLASS nokia_load_raw;
+ case 10: load_raw = &CLASS nokia_load_raw; break;
+#ifdef LIBRAW_LIBRARY_BUILD
+ case 0: throw LIBRAW_EXCEPTION_IO_CORRUPT; break;
+#endif
}
raw_height = height + (top_margin = i / (width * tiff_bps/8) - height);
mask[0][3] = 1;