diff mbox series

dmicheck: fix the wrong slot height value range

Message ID 20230307074743.11123-1-ivan.hu@canonical.com
State Accepted
Headers show
Series dmicheck: fix the wrong slot height value range | expand

Commit Message

Ivan Hu March 7, 2023, 7:47 a.m. UTC
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 <ivan.hu@canonical.com>
---
 src/dmi/dmicheck/dmicheck.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Sunny Wang March 8, 2023, 9:02 a.m. UTC | #1
Good catch, Ivan. The patch looks good to me.

Reviewed-by: Sunny Wang <sunny.wang@arm.com>

Best Regards,
Sunny
-----Original Message-----
From: fwts-devel <fwts-devel-bounces@lists.ubuntu.com> On Behalf Of Ivan Hu
Sent: 07 March 2023 07:48
To: fwts-devel@lists.ubuntu.com
Subject: [PATCH] dmicheck: fix the wrong slot height value range

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 <ivan.hu@canonical.com>
---
 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;

--
2.25.1


--
fwts-devel mailing list
fwts-devel@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/fwts-devel
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
diff mbox series

Patch

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;