--- Begin Message ---
Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock
Please unblock package lshw
* Backport upstream fix for floating point exception on invalid FAT,
thanks to Dave Gomboc and Bernhard Übelacker. (Closes: #946940)
diff -Nru lshw-02.18.85/debian/changelog lshw-02.18.85/debian/changelog
--- lshw-02.18.85/debian/changelog 2021-01-04 00:41:23.000000000 +0200
+++ lshw-02.18.85/debian/changelog 2021-07-17 20:19:28.000000000 +0300
@@ -1,3 +1,11 @@
+lshw (02.18.85-0.7) unstable; urgency=medium
+
+ * Non-maintainer upload.
+ * Backport upstream fix for floating point exception on invalid FAT,
+ thanks to Dave Gomboc and Bernhard Übelacker. (Closes: #946940)
+
+ -- Adrian Bunk <bunk@debian.org> Sat, 17 Jul 2021 20:19:28 +0300
+
lshw (02.18.85-0.6) unstable; urgency=medium
* Non-maintainer upload.
diff -Nru lshw-02.18.85/debian/patches/0001-fix-755-handle-invalid-FAT.patch lshw-02.18.85/debian/patches/0001-fix-755-handle-invalid-FAT.patch
--- lshw-02.18.85/debian/patches/0001-fix-755-handle-invalid-FAT.patch 1970-01-01 02:00:00.000000000 +0200
+++ lshw-02.18.85/debian/patches/0001-fix-755-handle-invalid-FAT.patch 2021-07-17 20:19:05.000000000 +0300
@@ -0,0 +1,41 @@
+From 89b3b6b9ed03f22ca98954712db5a90acf2c6755 Mon Sep 17 00:00:00 2001
+From: Lyonel Vincent <lyonel@ezix.org>
+Date: Sat, 28 Dec 2019 00:02:44 +0100
+Subject: fix #755: handle invalid FAT
+
+check that sectors_per_cluster!=0
+---
+ src/core/fat.cc | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/src/core/fat.cc b/src/core/fat.cc
+index e68aea6..41b0001 100644
+--- a/src/core/fat.cc
++++ b/src/core/fat.cc
+@@ -186,11 +186,6 @@ bool scan_fat(hwNode & n, source & id)
+ if (vs.heads == 0)
+ return false;
+
+- /* cluster size check */
+- if (vs.sectors_per_cluster == 0 ||
+- (vs.sectors_per_cluster & (vs.sectors_per_cluster-1)))
+- return false;
+-
+ /* media check */
+ if (vs.media < 0xf8 && vs.media != 0xf0)
+ return false;
+@@ -200,6 +195,11 @@ bool scan_fat(hwNode & n, source & id)
+ return false;
+
+ valid:
++ /* cluster size check */
++ if (vs.sectors_per_cluster == 0 ||
++ (vs.sectors_per_cluster & (vs.sectors_per_cluster-1)))
++ return false;
++
+ /* sector size check */
+ sector_size_bytes = le_short(&vs.sector_size_bytes);
+ if (sector_size_bytes != 0x200 && sector_size_bytes != 0x400 &&
+--
+2.20.1
+
diff -Nru lshw-02.18.85/debian/patches/series lshw-02.18.85/debian/patches/series
--- lshw-02.18.85/debian/patches/series 2020-04-26 14:43:52.000000000 +0300
+++ lshw-02.18.85/debian/patches/series 2021-07-17 20:19:28.000000000 +0300
@@ -10,3 +10,4 @@
add-missing-ethlink-standards.patch
cross.patch
#revert-Fix_JSON_output_format.patch
+0001-fix-755-handle-invalid-FAT.patch
--- End Message ---