Hi Rebecca,

On 4/25/20 12:55 AM, Rebecca Cran wrote:
This prevents overflow when printing DWORD fields such as the type 17
tables's extended DIMM size.

Similar issue with type 14:

ShellPrintEx(-1,-1,L"ItemType %d: %d\n", Index + 1, Struct->Type14->Group[Index].ItemType);

ShellPrintEx(-1,-1,L"ItemHandle %d: %d\n", Index + 1, Struct->Type14->Group[Index].ItemHandle);


Reviewed-by: Philippe Mathieu-Daude <phi...@redhat.com>


Cc: Ray Ni <ray...@intel.com>
Cc: Zhichao Gao <zhichao....@intel.com>
Signed-off-by: Rebecca Cran <rebe...@bsdio.com>
---
  .../Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c   | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c 
b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
index a75caff3de..be8b7c0a97 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
+++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
@@ -49,7 +49,7 @@
  #define PRINT_STRUCT_VALUE(pStruct, type, element) \
    do { \
      ShellPrintEx(-1,-1,L"%a",#element); \
-    ShellPrintEx(-1,-1,L": %d\n", (pStruct->type->element)); \
+    ShellPrintEx(-1,-1,L": %u\n", (pStruct->type->element)); \
    } while (0);
#define PRINT_STRUCT_VALUE_H(pStruct, type, element) \



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#58163): https://edk2.groups.io/g/devel/message/58163
Mute This Topic: https://groups.io/mt/73253250/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to