Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 3 Mar 2023 01:05:23 GMT
From:      John-Mark Gurney <jmg@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 13597be965b7 - main - length for the 64-bit entry is 32-bits, not 16-bits.
Message-ID:  <202303030105.32315NTX008532@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by jmg:

URL: https://cgit.FreeBSD.org/src/commit/?id=13597be965b7bcc7ff2c3c0bc240f3e0acc255cf

commit 13597be965b7bcc7ff2c3c0bc240f3e0acc255cf
Author:     John-Mark Gurney <jmg@FreeBSD.org>
AuthorDate: 2023-03-03 01:03:57 +0000
Commit:     John-Mark Gurney <jmg@FreeBSD.org>
CommitDate: 2023-03-03 01:03:57 +0000

    length for the 64-bit entry is 32-bits, not 16-bits.
    
    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 15c5c7e50565..1bb78faa3b01 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 */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202303030105.32315NTX008532>