:: commit 2c14cda023609c747c321154ad572c535154f053

Mintsuki <mintsuki@protonmail.com> — 2026-01-04 23:18

parents: f9c04622a6

config: Fix SMBIOS 3.0 table iteration using wrong field

diff --git a/common/lib/config.c b/common/lib/config.c
index 3eca346c..69a335bf 100644
--- a/common/lib/config.c
+++ b/common/lib/config.c
@@ -187,7 +187,9 @@ bool init_config_smbios(void) {
 
     if (smbios_entry_64) {
         hdr = (void *)(uintptr_t) smbios_entry_64->table_address;
-        table_length = smbios_entry_64->max_structure_size;
+        // SMBIOS 3.0 entry point does not provide table_length.
+        // Use a safe maximum bound; iteration terminates on type 127 end marker.
+        table_length = 0x10000;
     } else {
         hdr = (void *)(uintptr_t) smbios_entry_32->table_address;
         struct_count = smbios_entry_32->number_of_structures;
tab: 248 wrap: offon