From: Jeff Westfahl Date: Tue, 14 Mar 2017 21:02:01 +0000 (+0800) Subject: ShellPkg/HandleParsingLib: Correct format specifier for LoadedImage X-Git-Tag: edk2-stable201903~4379 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=7c6f0d14c3db1ade3e1ef701e39babd7a314eb56;ds=sidebyside 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. Cc: Ruiyu Ni Cc: Jaben Carsey Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Westfahl Reviewed-by: Ruiyu Ni Reviewed-by: Jaben Carsey --- 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"