SMBIOS (Windows): fixes issues raised by Copilot

This commit is contained in:
李通洲
2026-03-06 14:46:51 +08:00
parent 224bea2559
commit d040cc810f
+3 -1
View File
@@ -109,7 +109,7 @@ typedef struct FFSmbios20EntryPoint
uint8_t SmbiosBcdRevision;
} __attribute__((__packed__)) FFSmbios20EntryPoint;
static_assert(offsetof(FFSmbios20EntryPoint, SmbiosBcdRevision) == 0x1E,
"FFSmbios30EntryPoint: Wrong struct alignment");
"FFSmbios20EntryPoint: Wrong struct alignment");
typedef struct FFSmbios30EntryPoint
{
@@ -482,6 +482,8 @@ const FFSmbiosHeaderTable* ffGetSmbiosHeaderTable()
if (!NT_SUCCESS(NtQuerySystemInformation(SystemFirmwareTableInformation, buffer, bufSize, &bufSize)))
{
FF_DEBUG("NtQuerySystemInformation(SystemFirmwareTableInformation) failed");
free(buffer);
buffer = NULL;
return NULL;
}
FFRawSmbiosData* rawData = (FFRawSmbiosData*) buffer->TableBuffer;