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.20, mailfrom: linson.augustine@intel.com) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by groups.io with SMTP; Wed, 14 Aug 2019 01:41:05 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Aug 2019 01:41:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,384,1559545200"; d="scan'208";a="167327743" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga007.jf.intel.com with ESMTP; 14 Aug 2019 01:41:04 -0700 Received: from fmsmsx114.amr.corp.intel.com (10.18.116.8) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 14 Aug 2019 01:41:04 -0700 Received: from bgsmsx153.gar.corp.intel.com (10.224.23.4) by FMSMSX114.amr.corp.intel.com (10.18.116.8) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 14 Aug 2019 01:41:03 -0700 Received: from bgsmsx101.gar.corp.intel.com ([169.254.1.124]) by BGSMSX153.gar.corp.intel.com ([169.254.2.178]) with mapi id 14.03.0439.000; Wed, 14 Aug 2019 14:11:00 +0530 From: "Augustine, Linson" 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 Thread-Topic: [edk2-devel] [PATCH V2] ShellPkg/UefiShellDriver1CommandsLib: Make array big enough Thread-Index: AQHVQFsJiVBEuLoDzUStItmrmr/JEqbci5uQgB3pEMCAAAKQIA== Date: Wed, 14 Aug 2019 08:41:00 +0000 Message-ID: <983FD2DACE51124F8F76CF59EAD014960FF64EDE@BGSMSX101.gar.corp.intel.com> References: <20190722065756.18856-1-zhichao.gao@intel.com> <15B3A871197D540E.29669@groups.io> <15B4E567EC0F1559.24302@groups.io> <3CE959C139B4C44DBEA1810E3AA6F9000B822917@SHSMSX101.ccr.corp.intel.com> In-Reply-To: <3CE959C139B4C44DBEA1810E3AA6F9000B822917@SHSMSX101.ccr.corp.intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMDhkY2M4NWYtM2E5Ny00YWRjLWE3OTItYzBhYjNlYWYxMDBmIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiQ2kxRjE3VmVYdW56TFIxbk1IV3FMcVZrQWh4QkNxdlRwMVNjaW9zeUIzUlwvNFM4ZjRxTHoreThBeDlqQmt4Q1MifQ== dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.223.10.10] MIME-Version: 1.0 Return-Path: linson.augustine@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Linson Augustine Regards, -Linson -----Original Message----- From: Gao, Zhichao=20 Sent: Wednesday, August 14, 2019 2:03 PM To: devel@edk2.groups.io; Gao, Zhichao Cc: Carsey, Jaben ; Ni, Ray ; ol= eksiyy@ami.com; Augustine, Linson Subject: RE: [edk2-devel] [PATCH V2] ShellPkg/UefiShellDriver1CommandsLib:= Make array big enough Ping again. Thanks, Zhichao > -----Original Message----- > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of=20 > Gao, Zhichao > Sent: Friday, July 26, 2019 3:47 PM > To: devel@edk2.groups.io > Cc: Carsey, Jaben ; Ni, Ray=20 > ; oleksiyy@ami.com > Subject: FW: [edk2-devel] [PATCH V2] > ShellPkg/UefiShellDriver1CommandsLib: Make array big enough >=20 > Ping. Please help to review it. >=20 > Thanks, > Zhichao >=20 > -----Original Message----- > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of=20 > Gao, Zhichao > Sent: Monday, July 22, 2019 2:58 PM > To: devel@edk2.groups.io > Cc: Carsey, Jaben ; Ni, Ray=20 > ; Oleksiy > Subject: [edk2-devel] [PATCH V2] ShellPkg/UefiShellDriver1CommandsLib: > Make array big enough >=20 > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1941 >=20 > The two CHAR16 array ChildCountStr and DeviceCountStr is defined to=20 > 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-=20 > 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. >=20 > Cc: Jaben Carsey > Cc: Ray Ni > Cc: Oleksiy > Signed-off-by: Zhichao Gao > --- >=20 > V2: > Update the copyright. >=20 > ShellPkg/Library/UefiShellDriver1CommandsLib/Drivers.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) >=20 > 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. >=20 > (C) Copyright 2012-2015 Hewlett-Packard Development Company,=20 > L.P.
> - Copyright (c) 2010 - 2018, Intel Corporation. All rights=20 > reserved.
> + Copyright (c) 2010 - 2019, Intel Corporation. All rights=20 > + reserved.
> SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > **/ > @@ -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 >=20 >=20 >=20 >=20 >=20