From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.24, mailfrom: jaben.carsey@intel.com) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by groups.io with SMTP; Wed, 14 Aug 2019 08:03:57 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Aug 2019 08:03:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,385,1559545200"; d="scan'208";a="376072119" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga005.fm.intel.com with ESMTP; 14 Aug 2019 08:03:54 -0700 Received: from fmsmsx153.amr.corp.intel.com (10.18.125.6) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 14 Aug 2019 08:03:52 -0700 Received: from fmsmsx103.amr.corp.intel.com ([169.254.2.141]) by FMSMSX153.amr.corp.intel.com ([169.254.9.83]) with mapi id 14.03.0439.000; Wed, 14 Aug 2019 08:03:51 -0700 From: "Carsey, Jaben" To: "Augustine, Linson" , "Gao, Zhichao" , "devel@edk2.groups.io" CC: "Ni, Ray" , "oleksiyy@ami.com" Subject: Re: [edk2-devel] [PATCH V2] ShellPkg/UefiShellDriver1CommandsLib: Make array big enough Thread-Topic: [edk2-devel] [PATCH V2] ShellPkg/UefiShellDriver1CommandsLib: Make array big enough Thread-Index: AQHVUnrlozauyYK4x0yTfj5fJWQbBKb6yGIA///1mlA= Date: Wed, 14 Aug 2019 15:03:51 +0000 Message-ID: References: <20190722065756.18856-1-zhichao.gao@intel.com> <15B3A871197D540E.29669@groups.io> <15B4E567EC0F1559.24302@groups.io> <3CE959C139B4C44DBEA1810E3AA6F9000B822917@SHSMSX101.ccr.corp.intel.com> <983FD2DACE51124F8F76CF59EAD014960FF64EDE@BGSMSX101.gar.corp.intel.com> In-Reply-To: <983FD2DACE51124F8F76CF59EAD014960FF64EDE@BGSMSX101.gar.corp.intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMDhkY2M4NWYtM2E5Ny00YWRjLWE3OTItYzBhYjNlYWYxMDBmIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiQ2kxRjE3VmVYdW56TFIxbk1IV3FMcVZrQWh4QkNxdlRwMVNjaW9zeUIzUlwvNFM4ZjRxTHoreThBeDlqQmt4Q1MifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-originating-ip: [10.1.200.106] MIME-Version: 1.0 Return-Path: jaben.carsey@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Jaben Carsey Thanks -Jaben > -----Original Message----- > From: Augustine, Linson > Sent: Wednesday, August 14, 2019 1:41 AM > To: Gao, Zhichao ; devel@edk2.groups.io > Cc: Carsey, Jaben ; Ni, Ray ; > oleksiyy@ami.com > Subject: RE: [edk2-devel] [PATCH V2] > ShellPkg/UefiShellDriver1CommandsLib: Make array big enough >=20 > Reviewed-by: Linson Augustine >=20 > Regards, > -Linson >=20 > -----Original Message----- > From: Gao, Zhichao > Sent: Wednesday, August 14, 2019 2:03 PM > To: devel@edk2.groups.io; Gao, Zhichao > Cc: Carsey, Jaben ; Ni, Ray ; > oleksiyy@ami.com; Augustine, Linson > Subject: RE: [edk2-devel] [PATCH V2] > ShellPkg/UefiShellDriver1CommandsLib: Make array big enough >=20 > Ping again. >=20 > Thanks, > Zhichao >=20 > > -----Original Message----- > > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of > > Gao, Zhichao > > Sent: Friday, July 26, 2019 3:47 PM > > To: devel@edk2.groups.io > > Cc: Carsey, Jaben ; Ni, Ray > > ; oleksiyy@ami.com > > Subject: FW: [edk2-devel] [PATCH V2] > > ShellPkg/UefiShellDriver1CommandsLib: Make array big enough > > > > Ping. Please help to review it. > > > > Thanks, > > Zhichao > > > > -----Original Message----- > > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of > > Gao, Zhichao > > Sent: Monday, July 22, 2019 2:58 PM > > To: devel@edk2.groups.io > > Cc: Carsey, Jaben ; Ni, Ray > > ; Oleksiy > > Subject: [edk2-devel] [PATCH V2] ShellPkg/UefiShellDriver1CommandsLib: > > Make array big enough > > > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1941 > > > > The two CHAR16 array ChildCountStr and DeviceCountStr is defined to > > hold the decimal string data of UINTN. The max of UINTN is > > 18446744073709551615 and it contain 20 characters. > > So make their size to 21 CHAR16s to hold the string data with a null- > > terminate. > > UnicodeValueToStringS regard the value input as INT64, and > > 21 CHARs is enough to hold the lowest value with minus '-'. > > Although the value shouldn't be such big. > > > > Cc: Jaben Carsey > > Cc: Ray Ni > > Cc: Oleksiy > > Signed-off-by: Zhichao Gao > > --- > > > > V2: > > Update the copyright. > > > > ShellPkg/Library/UefiShellDriver1CommandsLib/Drivers.c | 6 +++--- > > 1 file changed, 3 insertions(+), 3 deletions(-) > > > > diff --git a/ShellPkg/Library/UefiShellDriver1CommandsLib/Drivers.c > > b/ShellPkg/Library/UefiShellDriver1CommandsLib/Drivers.c > > index 794b737bd1..27cd278cf0 100644 > > --- a/ShellPkg/Library/UefiShellDriver1CommandsLib/Drivers.c > > +++ b/ShellPkg/Library/UefiShellDriver1CommandsLib/Drivers.c > > @@ -2,7 +2,7 @@ > > Main file for Drivers shell Driver1 function. > > > > (C) Copyright 2012-2015 Hewlett-Packard Development Company, > > L.P.
> > - Copyright (c) 2010 - 2018, Intel Corporation. All rights > > reserved.
> > + Copyright (c) 2010 - 2019, Intel Corporation. All rights > > + reserved.
> > SPDX-License-Identifier: BSD-2-Clause-Patent > > > > **/ > > @@ -263,8 +263,8 @@ ShellCommandRunDrivers ( > > EFI_HANDLE *HandleWalker; > > UINTN ChildCount; > > UINTN DeviceCount; > > - CHAR16 ChildCountStr[3]; > > - CHAR16 DeviceCountStr[3]; > > + CHAR16 ChildCountStr[21]; > > + CHAR16 DeviceCountStr[21]; > > CHAR16 *Temp2; > > CONST CHAR16 *FullDriverName; > > CHAR16 *TruncatedDriverName; > > -- > > 2.21.0.windows.1 > > > > > > > > > > > >=20