From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-00010702.pphosted.com (mx0a-00010702.pphosted.com [148.163.156.75]) (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 4A8FD8036B for ; Wed, 15 Mar 2017 14:09:01 -0700 (PDT) Received: from pps.filterd (m0098780.ppops.net [127.0.0.1]) by mx0a-00010702.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id v2FL5r1E024667; Wed, 15 Mar 2017 16:09:00 -0500 Received: from ni.com (skprod3.natinst.com [130.164.80.24]) by mx0a-00010702.pphosted.com with ESMTP id 297d1601t2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 15 Mar 2017 16:09:00 -0500 Received: from us-aus-exch2.ni.corp.natinst.com (us-aus-exch2.ni.corp.natinst.com [130.164.68.12]) by us-aus-skprod3.natinst.com (8.16.0.17/8.16.0.17) with ESMTPS id v2FL8xLG031863 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 15 Mar 2017 16:08:59 -0500 Received: from us-aus-exch3.ni.corp.natinst.com (130.164.68.13) by us-aus-exch2.ni.corp.natinst.com (130.164.68.12) with Microsoft SMTP Server (TLS) id 15.0.1156.6; Wed, 15 Mar 2017 16:08:58 -0500 Received: from us-aus-exhub2.ni.corp.natinst.com (130.164.68.32) by us-aus-exch3.ni.corp.natinst.com (130.164.68.13) with Microsoft SMTP Server (TLS) id 15.0.1156.6; Wed, 15 Mar 2017 16:08:58 -0500 Received: from jmw-lm181.amer.corp.natinst.com (130.164.49.7) by us-aus-exhub2.ni.corp.natinst.com (130.164.68.32) with Microsoft SMTP Server id 15.0.1156.6 via Frontend Transport; Wed, 15 Mar 2017 16:08:58 -0500 Date: Wed, 15 Mar 2017 16:08:58 -0500 From: Jeff Westfahl X-X-Sender: jwestfah@jmw-lm181 To: "Carsey, Jaben" CC: Jeff Westfahl , "edk2-devel@lists.01.org" , "Ni, Ruiyu" In-Reply-To: Message-ID: References: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-03-15_09:, , signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1702020001 definitions=main-1703150159 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-03-15_09:, , signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=30 priorityscore=1501 malwarescore=0 suspectscore=2 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=30 reason=mlx scancount=1 engine=8.0.1-1702020001 definitions=main-1703150159 Subject: Re: [PATCH v2] ShellPkg/HandleParsingLib: Correct format specifier for LoadedImage X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Mar 2017 21:09:01 -0000 Content-Type: text/plain; charset="US-ASCII"; format=flowed Jaben, I think the output looks good with the udpated format. All of the output values are aligned, and it prints the hex address of the load options, just like it prints the hex address of the image address right below. Regards, Jeff On Wed, 15 Mar 2017, Carsey, Jaben wrote: > Does the print call need to be updated to print this out properly? > > -Jaben > >> -----Original Message----- >> From: Jeff Westfahl [mailto:jeff.westfahl@ni.com] >> Sent: Tuesday, March 14, 2017 2:02 PM >> To: edk2-devel@lists.01.org >> Cc: Jeff Westfahl ; Ni, Ruiyu ; >> Carsey, Jaben >> Subject: [PATCH v2] ShellPkg/HandleParsingLib: Correct format specifier for >> LoadedImage >> Importance: High >> >> 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 >> --- >> 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 0d51627..273a420 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.7.4 > >