ShellPkg/SmbiosView: Correct wrong length offset usage in SMBIOS Type4

The patch will correct wrong length offset usage in SMBIOS Type4.
For SMBIOS Ver3.6, length should be larger than 0x30.
For SMBIOS Ver3.8, length should be larger than 0x32.

Signed-off-by: Jason Zhao <jason.zhao@intel.com>
This commit is contained in:
Jason Zhao 2024-10-21 13:29:02 +08:00 committed by mergify[bot]
parent a19f50bb95
commit e2ab098e65
1 changed files with 2 additions and 2 deletions

View File

@ -520,11 +520,11 @@ SmbiosPrintStructure (
ShellPrintEx (-1, -1, L"Thread Count 2: %u\n", Struct->Type4->ThreadCount2);
}
if (AE_SMBIOS_VERSION (0x3, 0x6) && (Struct->Hdr->Length > 0x2E)) {
if (AE_SMBIOS_VERSION (0x3, 0x6) && (Struct->Hdr->Length > 0x30)) {
ShellPrintEx (-1, -1, L"Thread Enabled: %u\n", Struct->Type4->ThreadEnabled);
}
if (AE_SMBIOS_VERSION (0x3, 0x8) && (Struct->Hdr->Length > 0x30)) {
if (AE_SMBIOS_VERSION (0x3, 0x8) && (Struct->Hdr->Length > 0x32)) {
ShellPrintEx (-1, -1, L"Socket Type: %a\n", LibGetSmbiosString (Struct, Struct->Type4->SocketType));
}