summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Zhao <jason.zhao@intel.com>2024-10-21 13:29:02 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2024-10-22 03:57:20 +0000
commite2ab098e6599afaa2d4212a3ee007718b4df4869 (patch)
treec2b9bd865ad4fc6b2d78ecfbeb2806c7e5eff8e1
parenta19f50bb95f70c378488ed5459a1153730c0ef76 (diff)
downloadedk2-e2ab098e6599afaa2d4212a3ee007718b4df4869.tar.gz
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>
-rw-r--r--ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
index 2ee2bb44bc..5757036f58 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
+++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
@@ -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));
}