From nobody Thu May 9 00:31:56 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+44447+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+44447+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1564127205; cv=none; d=zoho.com; s=zohoarc; b=Rz5m3YZjo8Rs/HjXTL2c/P/jbLpWNejfwDqn6tmnE9ai4dCv9NPxKzwAyRGq0arbvF1df6znJuzhoDkbWk8MIAt0WXuJL5UbaazOkRrtvtOIKOX/97zfDpoqI95fBuq7pyZYm3vD5qe0EaV9L/jURvyt+CUllwBz3i9ieNOHIwA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1564127205; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To:ARC-Authentication-Results; bh=QFIteiGuqquZELhdB9xWOIXCBl/Dith+J6P7vuZlfMU=; b=JTAYwp+GQMa4QtEt49KjUrJjMu7Y9FUAKsXvpmDNFcedUGIrTTTCvUR78bO0br3NKUR6Vx7AhCObcM+2mJRZEXdV18DMg2EB/kDBZ1VgWrRqkixhzKgSqSYRxFlnJOekuKZrdkimNOSO9lXWLaaI59Dyi+Y0jZBJFSKHNwONQJs= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+44447+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1564127205892182.80526251847755; Fri, 26 Jul 2019 00:46:45 -0700 (PDT) Return-Path: X-Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by groups.io with SMTP; Fri, 26 Jul 2019 00:46:44 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Jul 2019 00:46:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,310,1559545200"; d="scan'208";a="254249444" X-Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga001.jf.intel.com with ESMTP; 26 Jul 2019 00:46:43 -0700 X-Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 26 Jul 2019 00:46:43 -0700 X-Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Fri, 26 Jul 2019 00:46:42 -0700 X-Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Fri, 26 Jul 2019 00:46:42 -0700 X-Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.80]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.112]) with mapi id 14.03.0439.000; Fri, 26 Jul 2019 15:46:40 +0800 From: "Gao, Zhichao" 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 Thread-Topic: [edk2-devel] [PATCH V2] ShellPkg/UefiShellDriver1CommandsLib: Make array big enough Thread-Index: AQHVQFsJiVBEuLoDzUStItmrmr/JEqbci5uQ Date: Fri, 26 Jul 2019 07:46:40 +0000 Message-ID: <3CE959C139B4C44DBEA1810E3AA6F9000B817D36@SHSMSX101.ccr.corp.intel.com> References: <20190722065756.18856-1-zhichao.gao@intel.com> <15B3A871197D540E.29669@groups.io> In-Reply-To: <15B3A871197D540E.29669@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 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,zhichao.gao@intel.com Content-Language: en-US Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1564127205; bh=QsKhfCl5Rs0dgQwXoDhOghjETf3YZn+RSmF0Ds5BQFI=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=etvziMeAXCCz7ySn+Zc0UtOQYjr17DIGZTAkN+Vhq42oyhYqCVyluaq4RnY0BM/G50h aknsyIxCA8/JouaDW09OTtG0Ci3duEqL+iZotgm/Yd8bqXPbBSaKQOUfyDoUbhc7ZH8KR 6ruKBVYRgjKD6+ULGR5xB7x7iXh+7dJ85Lk= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" 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 ; Ole= ksiy 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 th= e decimal string data of UINTN. The max of UINTN is 18446744073709551615 an= d it contain 20 characters. So make their size to 21 CHAR16s to hold the string data with a null-termin= ate. 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/Shell= Pkg/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=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 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#44447): https://edk2.groups.io/g/devel/message/44447 Mute This Topic: https://groups.io/mt/32607149/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-