diff options
author | Jason Zhao <jason.zhao@intel.com> | 2024-10-21 13:29:02 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2024-10-22 03:57:20 +0000 |
commit | e2ab098e6599afaa2d4212a3ee007718b4df4869 (patch) | |
tree | c2b9bd865ad4fc6b2d78ecfbeb2806c7e5eff8e1 | |
parent | a19f50bb95f70c378488ed5459a1153730c0ef76 (diff) | |
download | edk2-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.c | 4 |
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));
}
|