Check for minimal length of record when decoding HPE OEM 236. Signed-off-by: Jerry Hoemann <jerry.hoem...@hpe.com> --- dmioem.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/dmioem.c b/dmioem.c index 3f819ce..bce7fc4 100644 --- a/dmioem.c +++ b/dmioem.c @@ -536,6 +536,7 @@ static int dmi_decode_hp(const struct dmi_header *h) */ 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 _______________________________________________ https://lists.nongnu.org/mailman/listinfo/dmidecode-devel