From patchwork Tue Mar 7 07:47:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ivan Hu X-Patchwork-Id: 1752990 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=fwts-devel-bounces@lists.ubuntu.com; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=oHk73m+Z; dkim-atps=neutral Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PW6xR4zJ9z1yXD for ; Tue, 7 Mar 2023 18:47:55 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1pZS36-00085K-09; Tue, 07 Mar 2023 07:47:52 +0000 Received: from smtp-relay-canonical-0.internal ([10.131.114.83] helo=smtp-relay-canonical-0.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1pZS34-00085D-HZ for fwts-devel@lists.ubuntu.com; Tue, 07 Mar 2023 07:47:50 +0000 Received: from canonical.com (unknown [106.104.136.95]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-0.canonical.com (Postfix) with ESMTPSA id 1776A4178C for ; Tue, 7 Mar 2023 07:47:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1678175270; bh=BnKfvNyTSAor6vFmIuUVjmsz6bKhYLu1PTxbNaSiJGM=; h=From:To:Subject:Date:Message-Id:MIME-Version:Content-Type; b=oHk73m+Z+cj0ZQhAAlgf7mTd1wFd812pf7d91VEa+7G87HdhoxwaYa7HPGAU44jt2 FhSlWXMviPy9AI3V9oiWG4XlBGp+oYfa9AZ6zlZpT3amTtLv0r16euJ/2X6fVREtO3 JKqoKO9Rw6E6ghQsfSDiGqdZOAKd6t/MWTUz6I5jwIzZuYSF71ve2k5xsxjgAYPz15 OoiL01/+dJkhPR2kghsnyyGmcJgJssDBg2Ib5OgGkH3CYpGDlbS84+TxgLryyWAWGy O3lBMtXjBzMcfGNrFcUD6ROS3KMgJOcBYnf+aHEnzEvvzHBDpsxjbqFmwexpj9sxcG N4WeQ3yTeUAZA== From: Ivan Hu To: fwts-devel@lists.ubuntu.com Subject: [PATCH] dmicheck: fix the wrong slot height value range Date: Tue, 7 Mar 2023 15:47:43 +0800 Message-Id: <20230307074743.11123-1-ivan.hu@canonical.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-BeenThere: fwts-devel@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Firmware Test Suite Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: fwts-devel-bounces@lists.ubuntu.com Sender: "fwts-devel" Base on the SMBIOS specification, 7.10.13 System Slots — Slot Height the slot height value should be 0 to 4 Signed-off-by: Ivan Hu Reviewed-by: Sunny Wang Signed-off-by: Ivan Hu --- src/dmi/dmicheck/dmicheck.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dmi/dmicheck/dmicheck.c b/src/dmi/dmicheck/dmicheck.c index 9717d802..497a5c5f 100644 --- a/src/dmi/dmicheck/dmicheck.c +++ b/src/dmi/dmicheck/dmicheck.c @@ -1505,7 +1505,7 @@ static void dmicheck_entry(fwts_framework *fw, if (hdr->length < (0x18 + 5 * data[0x12])) break; - dmi_min_max_uint8_check(fw, table, addr, "Slot Height", hdr, (0x17 + 5 * data[0x12]), 0, 0x6); + dmi_min_max_uint8_check(fw, table, addr, "Slot Height", hdr, (0x17 + 5 * data[0x12]), 0, 0x4); break;