From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa3.dell-outbound.iphmx.com (esa3.dell-outbound.iphmx.com [68.232.153.94]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id D2C04820FE for ; Tue, 14 Feb 2017 14:40:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=dell.com; i=@dell.com; q=dns/txt; s=smtpout; t=1487111934; x=1518647934; h=from:to:subject:date:message-id:references:in-reply-to: content-transfer-encoding:mime-version; bh=cEaWbiEQREsNEEjiHXymrN9Er2AX3UulQzrzwzIfrsI=; b=Cq+Tp55oeYp8Zdb5687LK1cvUJt7F9qMQsa6AXCSun4yyKTEe7DmoiSQ hLJ7WbjKTIj+kT43l429hkyir49SZjc2uaJQZTL5FVaN+AOgBXUcf45x0 aANtm6ofuT/FxAP1Dw1Oq2tCYS9DBzURf/V/sAQhpwRZXZ5qmYHhYQBq8 8=; Received: from esa1.dell-outbound2.iphmx.com ([68.232.153.201]) by esa3.dell-outbound.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Feb 2017 16:38:54 -0600 From: Received: from ausxipps306.us.dell.com ([143.166.148.156]) by esa1.dell-outbound2.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Feb 2017 04:34:02 +0600 X-LoopCount0: from 10.175.216.249 X-IronPort-AV: E=Sophos;i="5.35,163,1484028000"; d="scan'208";a="72646852" To: , Thread-Topic: [edk2] [PATCH] ShellPkg/HandleParsingLib: Correct format specifier for LoadedImage Thread-Index: AQHShwz6TQunOBWyxEGGLjjxZm7yh6FpF1xg Date: Tue, 14 Feb 2017 22:40:21 +0000 Message-ID: <66fef1ec77c84e188120b733da3d00a9@ausx13mps335.AMER.DELL.COM> References: <62a8491631d9dbde89d160ab213d3a16a2e76534.1487107403.git.jeff.westfahl@ni.com> In-Reply-To: <62a8491631d9dbde89d160ab213d3a16a2e76534.1487107403.git.jeff.westfahl@ni.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titusconfig: Internal Use 04051212 x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvIiwiaWQiOiJmZjdkMWJlYy1jOWRjLTRlYzktYmZmMC00ZTEzM2E3YzYxNjgiLCJwcm9wcyI6W3sibiI6IkNsYXNzaWZpY2F0aW9uIiwidmFscyI6W3sidmFsdWUiOiJJbnRlcm5hbCBVc2UifV19LHsibiI6IlN1YmxhYmVscyIsInZhbHMiOltdfSx7Im4iOiJFeHRlcm5hbENvcnJlc3BvbmRlbmNlIiwidmFscyI6W3sidmFsdWUiOiJObyJ9XX1dfSwiU3ViamVjdExhYmVscyI6W10sIlRNQ1ZlcnNpb24iOiIxNi4yLjExLjAiLCJUcnVzdGVkTGFiZWxIYXNoIjoiTnhZNGFBYmdyV1NmaURtR1puVklBbmt3clwvaWVnditNbXFoMUtaTGNOWWs9In0= x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.210.125.233] MIME-Version: 1.0 Subject: Re: [PATCH] ShellPkg/HandleParsingLib: Correct format specifier for LoadedImage X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Feb 2017 22:40:24 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Dell - Internal Use - Confidential =20 Jeff, Perhaps a better approach is to print *all* the LoadOptions data as hex byt= es? In addition, one might first analyze the LoadOptions data, and, when apropo= s, print obvious strings as strings? Regards, Jim -----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@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 --- 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" --=20 2.11.0.windows.3 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel