[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[dmidecode] [PATCH v2 4/4] dmioem: Fix HPE OEM 236
From: |
Jerry Hoemann |
Subject: |
[dmidecode] [PATCH v2 4/4] dmioem: Fix HPE OEM 236 |
Date: |
Tue, 12 Jan 2021 01:05:05 -0700 |
Check for minimal length of record when decoding HPE OEM 236.
Signed-off-by: Jerry Hoemann <jerry.hoemann@hpe.com>
---
dmioem.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/dmioem.c b/dmioem.c
index 2f38229..f8ca3b4 100644
--- a/dmioem.c
+++ b/dmioem.c
@@ -543,6 +543,7 @@ static int dmi_decode_hp(const struct dmi_header *h)
* 0x14 | Name | STRING| (deprecated) Backplane
Name
*/
pr_handle_name("%s HDD Backplane FRU Information",
company);
+ if (h->length < 0x08) break;
pr_attr("FRU I2C Address", "0x%X raw(0x%X)", data[0x4]
>> 1, data[0x4]);
pr_attr("Box Number", "%d", WORD(data + 0x5));
pr_attr("NVRAM ID", "0x%X", WORD(data + 0x7));
--
2.26.2
[dmidecode] [PATCH v2 4/4] dmioem: Fix HPE OEM 236,
Jerry Hoemann <=