Please disregard the earlier "Confidential" text. The stupid plug-in that adds this does not show the text in the mail when it is composed in text mode, so I often forget to turn this "feature" off when posting. Sorry.
-----Original Message----- From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Dailey, Jim Sent: Tuesday, February 14, 2017 4:40 PM To: jeff.westf...@ni.com; edk2-devel@lists.01.org Subject: Re: [edk2] [PATCH] ShellPkg/HandleParsingLib: Correct format specifier for LoadedImage Jeff, Perhaps a better approach is to print *all* the LoadOptions data as hex bytes? In addition, one might first analyze the LoadOptions data, and, when apropos, print obvious strings as strings? Regards, Jim -----Original Message----- From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Jeff Westfahl Sent: Tuesday, February 14, 2017 3:54 PM To: edk2-devel@lists.01.org Subject: [edk2] [PATCH] ShellPkg/HandleParsingLib: Correct format specifier for LoadedImage The format specifier for the LoadOptions field of the LoadedImage protocol is "%s". However, the data in LoadOptions is often generic binary data. A format specifier of "%x" is more appropriate for this field. Using "dh -v" with format specifier "%s" on BIOS images based on EDK II source before commit 891d844 can cause a crash. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Westfahl <jeff.westf...@ni.com> --- ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni index 0d51627c5f..273a4201bc 100644 --- a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni +++ b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni @@ -354,7 +354,7 @@ " DeviceHandle..: %%H%x%%N\r\n" " FilePath......: %%H%x%%N\r\n" " OptionsSize...: %%H%x%%N\r\n" - " LoadOptions...: %%H%s%%N\r\n" + " LoadOptions...: %%H%x%%N\r\n" " ImageBase.....: %%H%x%%N\r\n" " ImageSize.....: %%H%Lx%%N\r\n" " CodeType......: %%H%s%%N\r\n" -- 2.11.0.windows.3 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel