From patchwork Mon Nov 28 17:17:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Peter_M=C3=BCller?= X-Patchwork-Id: 6199 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4NLXFw36xFz3xfS for ; Mon, 28 Nov 2022 17:17:08 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4NLXFv0d5yz2JJ; Mon, 28 Nov 2022 17:17:07 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4NLXFt6lzdz2xc8; Mon, 28 Nov 2022 17:17:06 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4NLXFs42Zfz2xZK for ; Mon, 28 Nov 2022 17:17:05 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4NLXFr5RSGz1Fy for ; Mon, 28 Nov 2022 17:17:04 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1669655825; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=q2oYNQ9O+IZ42Yry06XCtJ1ZWri4JO5JWPFAAL6kSqU=; b=rG/bzAnLTyC60lboTOSV7rhosfSWCFyPOkAbd4dJJSw5eijnmGKHb/xUcFTYweKNpzzyNZ Fb2NYoCcl9d6kvAg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1669655825; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=q2oYNQ9O+IZ42Yry06XCtJ1ZWri4JO5JWPFAAL6kSqU=; b=CJJQfOs9Gb6nnv6P5rZnfK5swL2yaxZPx44SyDsf7jsXE9qiYmGBWmO3DWJYTGeeOMZR9k gjX76RPg77zVAPMOaXFCglsJmThEMzZ2UInsfXMXybjW3IFYJMffYh1y0hEL6+cgc0gDFI oqrHcEwlJ3B4XFDXqqw2dY04277JwZYlnmT4V6z3FIkdNRDCptIwIdFdUCvPRqJgdKOgF0 0OD6xIk8dyS2GbSOer2ZO1bF5TVYRjwbUNiHy8UnCDJgxsXu9uhlO7V2uLZbaxb4NdXFqG AGmcb0hzP4/VNrirUr98Y8mnlph71AWuN3ig4+8BUiYeCEy6L6s1/FR1XfDTmQ== Message-ID: <8d0bcdb3-4d0f-cc83-87c7-defc22d8888b@ipfire.org> Date: Mon, 28 Nov 2022 18:17:03 +0100 MIME-Version: 1.0 Content-Language: en-US To: development@lists.ipfire.org From: =?utf-8?q?Peter_M=C3=BCller?= Subject: [PATCH] dmidecode: Update to 3.3 X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" Signed-off-by: Peter Müller --- dmidecode/dmidecode.nm | 2 +- ...midecode-3.3-fix_crash_with_u_option.patch | 34 +++++++++++++++++++ ..._the_condition_error_in_ascii_filter.patch | 30 ++++++++++++++++ 3 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 dmidecode/patches/dmidecode-3.3-fix_crash_with_u_option.patch create mode 100644 dmidecode/patches/dmidecode-3.3-fix_the_condition_error_in_ascii_filter.patch diff --git a/dmidecode/dmidecode.nm b/dmidecode/dmidecode.nm index 27eee5d14..e4e37cbf5 100644 --- a/dmidecode/dmidecode.nm +++ b/dmidecode/dmidecode.nm @@ -4,7 +4,7 @@ ############################################################################### name = dmidecode -version = 3.2 +version = 3.3 release = 1 groups = Applications/System diff --git a/dmidecode/patches/dmidecode-3.3-fix_crash_with_u_option.patch b/dmidecode/patches/dmidecode-3.3-fix_crash_with_u_option.patch new file mode 100644 index 000000000..497768add --- /dev/null +++ b/dmidecode/patches/dmidecode-3.3-fix_crash_with_u_option.patch @@ -0,0 +1,34 @@ +From 11e134e54d15e67a64c39a623f492a28df922517 Mon Sep 17 00:00:00 2001 +From: Jean Delvare +Date: Tue, 19 Jan 2021 16:26:01 +0100 +Subject: dmidecode: Fix crash with -u option + +A segmentation fault was reported with option -u. Turns out to be a +stupid thinko where the buffer offset was reset at the wrong loop +depth. + +Reported-by: Jerry Hoemann +Fixes: da06888d08b9 ("dmidecode: Use the print helpers in dump mode too") +Signed-off-by: Jean Delvare +--- + dmidecode.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dmidecode.c b/dmidecode.c +index 572cb1a..69ea0e8 100644 +--- a/dmidecode.c ++++ b/dmidecode.c +@@ -248,9 +248,9 @@ static void dmi_dump(const struct dmi_header *h) + { + 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", +-- +cgit v1.2.1 + diff --git a/dmidecode/patches/dmidecode-3.3-fix_the_condition_error_in_ascii_filter.patch b/dmidecode/patches/dmidecode-3.3-fix_the_condition_error_in_ascii_filter.patch new file mode 100644 index 000000000..e5f99b477 --- /dev/null +++ b/dmidecode/patches/dmidecode-3.3-fix_the_condition_error_in_ascii_filter.patch @@ -0,0 +1,30 @@ +From 1117390ccd9cea139638db6f460bb6de70e28f94 Mon Sep 17 00:00:00 2001 +From: Tianjia Zhang +Date: Tue, 5 Jan 2021 10:36:29 +0100 +Subject: dmidecode: Fix the condition error in ascii_filter + +The normal printable ASCII range is 32 to 127 (not included), +so fix the error in this if condition. + +Signed-off-by: Tianjia Zhang +Signed-off-by: Jean Delvare +--- + dmidecode.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dmidecode.c b/dmidecode.c +index 27d5494..864a193 100644 +--- a/dmidecode.c ++++ b/dmidecode.c +@@ -116,7 +116,7 @@ static void ascii_filter(char *bp, size_t len) + 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] = '.'; + } + +-- +cgit v1.2.1 +