From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.120, mailfrom: zhichao.gao@intel.com) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by groups.io with SMTP; Wed, 14 Aug 2019 01:33:08 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Aug 2019 01:33:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,384,1559545200"; d="scan'208";a="181457520" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga006.jf.intel.com with ESMTP; 14 Aug 2019 01:33:07 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 14 Aug 2019 01:33:07 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.80]) by shsmsx102.ccr.corp.intel.com ([169.254.2.19]) with mapi id 14.03.0439.000; Wed, 14 Aug 2019 16:33:04 +0800 From: "Gao, Zhichao" 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 Thread-Topic: [edk2-devel] [PATCH V2] ShellPkg/UefiShellDriver1CommandsLib: Make array big enough Thread-Index: AQHVQFsJiVBEuLoDzUStItmrmr/JEqbci5uQgB3pEMA= Date: Wed, 14 Aug 2019 08:33:03 +0000 Message-ID: <3CE959C139B4C44DBEA1810E3AA6F9000B822917@SHSMSX101.ccr.corp.intel.com> References: <20190722065756.18856-1-zhichao.gao@intel.com> <15B3A871197D540E.29669@groups.io> <15B4E567EC0F1559.24302@groups.io> In-Reply-To: <15B4E567EC0F1559.24302@groups.io> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: zhichao.gao@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Ping again. Thanks, Zhichao > -----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 >=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 > 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 >=20 > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1941 >=20 > 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. >=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, 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 >=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