From a704ffd24425cbcc7b5227cca41d2e8b5f627759 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Sun, 22 Dec 2019 20:00:45 +0100 Subject: New debian/patches/0130-Correct_lanplus_segment_violation.patch --- debian/changelog | 7 ++++++ .../0130-Correct_lanplus_segment_violation.patch | 29 ++++++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 37 insertions(+) create mode 100644 debian/patches/0130-Correct_lanplus_segment_violation.patch diff --git a/debian/changelog b/debian/changelog index 4d4749e..f82b225 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +ipmitool (1.8.18-8) UNRELEASED; urgency=medium + + * New debian/patches/0130-Correct_lanplus_segment_violation.patch: + - Fix lanplus segment violation for truncated response (Closes: #945764). + + -- Jörg Frings-Fürst Sun, 22 Dec 2019 19:29:46 +0100 + ipmitool (1.8.18-7) unstable; urgency=medium * debian/watch: Use tags instead releases to fix the wrong format. diff --git a/debian/patches/0130-Correct_lanplus_segment_violation.patch b/debian/patches/0130-Correct_lanplus_segment_violation.patch new file mode 100644 index 0000000..17e8fe5 --- /dev/null +++ b/debian/patches/0130-Correct_lanplus_segment_violation.patch @@ -0,0 +1,29 @@ +Description: Fix lanplus segment violation for truncated response +Origin: upstream, https://github.com/pjdhpe/ipmitool/commit/815aae70cf8dc9f0e1ba1923fc4ec3cc16d0d2f1?diff=unified +Bug: https://github.com/ipmitool/ipmitool/issues/72 +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=945764 +Last-Update: 2019-12-22 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +Index: trunk/src/plugins/lanplus/lanplus.c +=================================================================== +--- trunk.orig/src/plugins/lanplus/lanplus.c ++++ trunk/src/plugins/lanplus/lanplus.c +@@ -819,7 +819,7 @@ ipmi_lan_poll_single(struct ipmi_intf * + * rsp->data_len becomes the length of that data + */ + extra_data_length = payload_size - (offset - payload_start) - 1; +- if (extra_data_length) { ++ if (extra_data_length > 0) { + rsp->data_len = extra_data_length; + memmove(rsp->data, rsp->data + offset, extra_data_length); + } else { +@@ -873,7 +873,7 @@ ipmi_lan_poll_single(struct ipmi_intf * + } + read_sol_packet(rsp, &offset); + extra_data_length = payload_size - (offset - payload_start); +- if (rsp && extra_data_length) { ++ if (rsp && extra_data_length > 0) { + rsp->data_len = extra_data_length; + memmove(rsp->data, rsp->data + offset, extra_data_length); + } else { diff --git a/debian/patches/series b/debian/patches/series index d9b084c..95205ad 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -10,3 +10,4 @@ 0115-typo.patch 0125-nvidia-iana.patch 0615-manpage_typo.patch +0130-Correct_lanplus_segment_violation.patch -- cgit v1.2.3