[edk2-devel] [PATCH] ShellPkg: smbiosview - print field values as unsigned integers
Rebecca Cran
rebecca at bsdio.com
Fri Apr 24 22:55:55 UTC 2020
This prevents overflow when printing DWORD fields such as the type 17
tables's extended DIMM size.
Cc: Ray Ni <ray.ni at intel.com>
Cc: Zhichao Gao <zhichao.gao at intel.com>
Signed-off-by: Rebecca Cran <rebecca at 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) \
--
2.25.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#58123): https://edk2.groups.io/g/devel/message/58123
Mute This Topic: https://groups.io/mt/73253250/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
More information about the edk2-devel-archive
mailing list