Blame SOURCES/CVE-2017-18198-part3.patch

578e1d
--- ./libcdio-0.92/include/cdio/bytesex.h	2018-06-05 18:05:16.183586450 +0200
578e1d
+++ ../libcdio-fedora/libcdio-0.94/include/cdio/bytesex.h	2015-05-09 00:27:50.000000000 +0200
578e1d
@@ -197,19 +197,31 @@
578e1d
 }
578e1d
 
578e1d
 /** Convert from ISO 9660 7.3.3 format to uint32_t */
578e1d
-static CDIO_INLINE uint32_t 
578e1d
+static CDIO_INLINE uint32_t
578e1d
 from_733 (uint64_t p)
578e1d
 {
578e1d
   if (uint64_swap_le_be (p) != p)
578e1d
     cdio_warn ("from_733: broken byte order");
578e1d
-    
578e1d
+
578e1d
+  return (UINT32_C(0xFFFFFFFF) & p);
578e1d
+}
578e1d
+
578e1d
+static CDIO_INLINE uint32_t
578e1d
+from_733_with_err (uint64_t p, bool *err)
578e1d
+{
578e1d
+  if (uint64_swap_le_be (p) != p) {
578e1d
+    cdio_warn ("from_733: broken byte order");
578e1d
+    *err = true;
578e1d
+  } else {
578e1d
+    *err = false;
578e1d
+  }
578e1d
   return (UINT32_C(0xFFFFFFFF) & p);
578e1d
 }
578e1d
 
578e1d
 #endif /* CDIO_BYTESEX_H_ */
578e1d
 
578e1d
 
578e1d
-/* 
578e1d
+/*
578e1d
  * Local variables:
578e1d
  *  c-file-style: "gnu"
578e1d
  *  tab-width: 8