From 13597be965b7bcc7ff2c3c0bc240f3e0acc255cf Mon Sep 17 00:00:00 2001 From: John-Mark Gurney Date: Thu, 2 Mar 2023 17:03:57 -0800 Subject: [PATCH] length for the 64-bit entry is 32-bits, not 16-bits. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reported by: Jérôme Duval (korli on github) --- stand/libsa/smbios.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stand/libsa/smbios.c b/stand/libsa/smbios.c index 15c5c7e5056..1bb78faa3b0 100644 --- a/stand/libsa/smbios.c +++ b/stand/libsa/smbios.c @@ -486,7 +486,7 @@ smbios_probe(const caddr_t addr) #ifdef HAS_SMBV3 if (isv3) { - smbios.length = SMBIOS_GET16(saddr, 0x0c); /* Structure Table Length */ + smbios.length = SMBIOS_GET32(saddr, 0x0c); /* Structure Table Length */ paddr = SMBIOS_GET64(saddr, 0x10); /* Structure Table Address */ smbios.count = -1; /* not present in V3 */ smbios.ver = 0; /* not present in V3 */