summaryrefslogtreecommitdiff
path: root/debian/patches
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches')
-rw-r--r--debian/patches/0001-hurd.patch2
-rw-r--r--debian/patches/0145-Fix_condition_error_in_ascii_filter.patch18
-rw-r--r--debian/patches/0150-Fix_crash.patch21
-rw-r--r--debian/patches/0155-use_read_file.patch43
-rw-r--r--debian/patches/0160-HPE_OEM_Firmware_change.patch32
-rw-r--r--debian/patches/series8
6 files changed, 121 insertions, 3 deletions
diff --git a/debian/patches/0001-hurd.patch b/debian/patches/0001-hurd.patch
index 236cdea..8f26387 100644
--- a/debian/patches/0001-hurd.patch
+++ b/debian/patches/0001-hurd.patch
@@ -5,7 +5,7 @@ Index: trunk/Makefile
===================================================================
--- trunk.orig/Makefile
+++ trunk/Makefile
-@@ -43,7 +43,7 @@ INSTALL_PROGRAM := $(INSTALL) -m 755
+@@ -44,7 +44,7 @@ INSTALL_PROGRAM := $(INSTALL) -m 755
RM := rm -f
# BSD make provides $MACHINE, but GNU make doesn't
diff --git a/debian/patches/0145-Fix_condition_error_in_ascii_filter.patch b/debian/patches/0145-Fix_condition_error_in_ascii_filter.patch
new file mode 100644
index 0000000..c7d976e
--- /dev/null
+++ b/debian/patches/0145-Fix_condition_error_in_ascii_filter.patch
@@ -0,0 +1,18 @@
+Description: Fix the condition error in ascii_filter
+Origin: upstream, http://git.savannah.gnu.org/cgit/dmidecode.git/commit/?id=1117390ccd9cea139638db6f460bb6de70e28f94
+Last-Update: 2021-05-07
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+Index: trunk/dmidecode.c
+===================================================================
+--- trunk.orig/dmidecode.c
++++ trunk/dmidecode.c
+@@ -116,7 +116,7 @@ static void ascii_filter(char *bp, size_
+ size_t i;
+
+ for (i = 0; i < len; i++)
+- if (bp[i] < 32 || bp[i] == 127)
++ if (bp[i] < 32 || bp[i] >= 127)
+ bp[i] = '.';
+ }
+
diff --git a/debian/patches/0150-Fix_crash.patch b/debian/patches/0150-Fix_crash.patch
new file mode 100644
index 0000000..c6c5af7
--- /dev/null
+++ b/debian/patches/0150-Fix_crash.patch
@@ -0,0 +1,21 @@
+Description: Fix crash with -u option
+Origin: upstream, http://git.savannah.gnu.org/cgit/dmidecode.git/commit/?id=11e134e54d15e67a64c39a623f492a28df922517
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=987033
+Last-Update: 2021-05-07
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+Index: trunk/dmidecode.c
+===================================================================
+--- trunk.orig/dmidecode.c
++++ trunk/dmidecode.c
+@@ -248,9 +248,9 @@ static void dmi_dump(const struct dmi_he
+ {
+ int j, l = strlen(s) + 1;
+
+- off = 0;
+ for (row = 0; row < ((l - 1) >> 4) + 1; row++)
+ {
++ off = 0;
+ for (j = 0; j < 16 && j < l - (row << 4); j++)
+ off += sprintf(raw_data + off,
+ j ? " %02X" : "%02X",
diff --git a/debian/patches/0155-use_read_file.patch b/debian/patches/0155-use_read_file.patch
new file mode 100644
index 0000000..18b1fb3
--- /dev/null
+++ b/debian/patches/0155-use_read_file.patch
@@ -0,0 +1,43 @@
+Description: Use read_file() instead of mem_chunk()
+Origin: upstream, https://git.savannah.gnu.org/cgit/dmidecode.git/commit/?id=c76ddda0ba0aa99a55945e3290095c2ec493c892
+Forwarded: not-needed
+Last-Update: 2023-07-15
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+Index: trunk/dmidecode.c
+===================================================================
+--- trunk.orig/dmidecode.c
++++ trunk/dmidecode.c
+@@ -6025,15 +6025,23 @@ int main(int argc, char * const argv[])
+ pr_comment("dmidecode %s", VERSION);
+
+ /* Read from dump if so instructed */
++ size = 0x20;
+ if (opt.flags & FLAG_FROM_DUMP)
+ {
+ if (!(opt.flags & FLAG_QUIET))
+ pr_info("Reading SMBIOS/DMI data from file %s.",
+ opt.dumpfile);
+- if ((buf = mem_chunk(0, 0x20, opt.dumpfile)) == NULL)
++ if ((buf = read_file(0, &size, opt.dumpfile)) == NULL)
+ {
+ ret = 1;
+ goto exit_free;
++ }
++
++ /* Truncated entry point can't be processed */
++ if (size < 0x20)
++ {
++ ret = 1;
++ goto done;
+ }
+
+ if (memcmp(buf, "_SM3_", 5) == 0)
+@@ -6059,7 +6067,6 @@ int main(int argc, char * const argv[])
+ * contain one of several types of entry points, so read enough for
+ * the largest one, then determine what type it contains.
+ */
+- size = 0x20;
+ if (!(opt.flags & FLAG_NO_SYSFS)
+ && (buf = read_file(0, &size, SYS_ENTRY_FILE)) != NULL)
+ {
diff --git a/debian/patches/0160-HPE_OEM_Firmware_change.patch b/debian/patches/0160-HPE_OEM_Firmware_change.patch
new file mode 100644
index 0000000..075b566
--- /dev/null
+++ b/debian/patches/0160-HPE_OEM_Firmware_change.patch
@@ -0,0 +1,32 @@
+Description: HPE OEM Record 237 Firmware change
+Origin: upstream, http://git.savannah.gnu.org/cgit/dmidecode.git/commit/?id=80de376231e903d2cbea95e51ffea31860502159
+Forwarded: not-needed
+Last-Update: 2023-07-15
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+Index: trunk/dmioem.c
+===================================================================
+--- trunk.orig/dmioem.c
++++ trunk/dmioem.c
+@@ -1094,7 +1094,8 @@ static int dmi_decode_hp(const struct dm
+ * 0x06 | Manufacture|STRING | DIMM Manufacturer
+ * 0x07 | Part Number|STRING | DIMM Manufacturer's Part Number
+ * 0x08 | Serial Num |STRING | DIMM Vendor Serial Number
+- * 0x09 | Spare Part |STRING | DIMM Spare Part Number
++ * 0x09 | Man Date | BYTE | DIMM Manufacture Date (YEAR) in BCD
++ * 0x0A | Man Date | BYTE | DIMM Manufacture Date (WEEK) in BCD
+ */
+ if (gen < G9) return 0;
+ pr_handle_name("%s DIMM Vendor Information", company);
+@@ -1105,8 +1106,9 @@ static int dmi_decode_hp(const struct dm
+ pr_attr("DIMM Manufacturer Part Number", "%s", dmi_string(h, data[0x07]));
+ if (h->length < 0x09) break;
+ pr_attr("DIMM Vendor Serial Number", "%s", dmi_string(h, data[0x08]));
+- if (h->length < 0x0A) break;
+- pr_attr("DIMM Spare Part Number", "%s", dmi_string(h, data[0x09]));
++ if (h->length < 0x0B) break;
++ if (WORD(data + 0x09))
++ pr_attr("DIMM Manufacture Date", "20%02x-W%02x", data[0x09], data[0x0A]);
+ break;
+
+ case 238:
diff --git a/debian/patches/series b/debian/patches/series
index fb5d205..5219567 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,6 +1,8 @@
+#0145-Fix_condition_error_in_ascii_filter.patch
+#0150-Fix_crash.patch
0100-ansi-c.patch
0001-hurd.patch
-0005-build.patch
+#0005-build.patch
#0105-dmidecode-avoid-sigbus.patch
#0110-nosysfs.patch
#0115-no_smbios_DMI_entry_point.patch
@@ -8,4 +10,6 @@
#0125-use_read_file_to_read_DMI_table_from_sysfs.patch
#0130-use_DWORD_for_table_max_size.patch
#0135-hide_fixup_msg.patch
-0140-Fix_scan_entry_point.patch
+#0140-Fix_scan_entry_point.patch
+0155-use_read_file.patch
+0160-HPE_OEM_Firmware_change.patch