From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mx.groups.io with SMTP id smtpd.web11.6178.1586323647398254398 for ; Tue, 07 Apr 2020 22:27:27 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=sKCkjKSU; spf=pass (domain: intel.com, ip: 192.55.52.151, mailfrom: guomin.jiang@intel.com) IronPort-SDR: O5nwyUec7qM99+92XLID2TPxjlrsD7f52luAjf1we+2jEYq5HgX4pPsIpfENw6Mo2HQbtZjG71 cAYA4oJyyXoA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Apr 2020 22:27:27 -0700 IronPort-SDR: 9SmJ1he1x3A7orZaJ2B3yTv9xcBoem+lkmraF88LLouks0hUArwGS+Mm3Jc+G86iLWzau0t5V+ 47/ROqwtCN6w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,357,1580803200"; d="scan'208";a="361749248" Received: from orsmsx108.amr.corp.intel.com ([10.22.240.6]) by fmsmga001.fm.intel.com with ESMTP; 07 Apr 2020 22:27:27 -0700 Received: from orsmsx115.amr.corp.intel.com (10.22.240.11) by ORSMSX108.amr.corp.intel.com (10.22.240.6) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 7 Apr 2020 22:27:26 -0700 Received: from ORSEDG001.ED.cps.intel.com (10.7.248.4) by ORSMSX115.amr.corp.intel.com (10.22.240.11) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 7 Apr 2020 22:27:26 -0700 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.177) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 7 Apr 2020 22:27:26 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=c35QBxs0BVww1QP4xxHO99viIzALbRiHb+Kia651YPkVE9AfmlUoZqd6nM887yrioF7+nUBM94GRHlJbzQec36NRq6v6IVPXxsljjGnCWITzyaDWmEheBydMTO6Upm5XhNiKOGKkdkhJLQpUT8HJqv3UziQTI351Em95DeGaOVY+t0G1za/JsC+SDxwBUysDzAmRw7t53VSvAF50TuDgsHdvktstiWJf4OBnkW2hbNRRld8kOElu41m/K2u9Fjt3YMWSB9+Jzrq8Vkexuswx7qPxldsg9uIR97HbEyl10YIGpu/hjC2a2V72aZlhK62eyC7ZcyQdsyQtMg1wPMKLzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=MVaqZGxprlHqcu6aqEHpqIaodV2or51wOSjp2/vsjK8=; b=nafI3E2SAaGX5pF0fbbHBUUV3R3J9wC3TyzbE4/gieo210o0rjgyYvDQhU9cTyB7Hpe4db6HetmnCxdZ6qEdPbeOBs+qCoLuunclXkWEmva7fbVhMKHrhmSSbcl9mCNZpbu1CtTtAWRQm3/LjnhI9WgLH9CLISrV2eUCkNtKoKfIR6X50KS2bh2ufhnukkn7MlYy0jHYpY8vb8u6tXYelh4CEbBNP1FtPr3sTt7Sp69YEYLelmlB8hR65lAqT2vWdtkqsa7g8QW3yhQdgdrFhBGcPmm4GH1UGxYQl50kkzltMdzGPxNKJAtl9zyVeH/NNH3aUupNfCfBuWZi+j9Duw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=MVaqZGxprlHqcu6aqEHpqIaodV2or51wOSjp2/vsjK8=; b=sKCkjKSUKXvZXaLU3KIlyPmULeJLepIeRmiBbKgGlPB+i+313SLioC2O4/Ef39gz1+kQ/VanpIO1XysChKJtMm6SM4ZNdLGjWhFbOM/YdEPKmP7cyzT5kZCwOVTrDl1IRWL+2eT5bOSnGw0bpoABrkW92A4QyQL4qH/O7UWIB0U= Received: from DM6PR11MB2955.namprd11.prod.outlook.com (2603:10b6:5:65::31) by DM6PR11MB2729.namprd11.prod.outlook.com (2603:10b6:5:ce::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2878.19; Wed, 8 Apr 2020 05:27:24 +0000 Received: from DM6PR11MB2955.namprd11.prod.outlook.com ([fe80::f1ec:734d:b127:4519]) by DM6PR11MB2955.namprd11.prod.outlook.com ([fe80::f1ec:734d:b127:4519%3]) with mapi id 15.20.2878.022; Wed, 8 Apr 2020 05:27:24 +0000 From: "Guomin Jiang" To: "devel@edk2.groups.io" , "Jiang, Guomin" CC: "Kinney, Michael D" , Sean Brogan , Bret Barkelew Subject: Re: [edk2-devel] [PATCH] UnitTestFrameworkPkg/PersistenceLib: Correct the allocated size. Thread-Topic: [edk2-devel] [PATCH] UnitTestFrameworkPkg/PersistenceLib: Correct the allocated size. Thread-Index: AQHWBwlJMuxLG83/2kOw0Jc0WNIEYahuvmIA Date: Wed, 8 Apr 2020 05:27:24 +0000 Message-ID: References: <160144926718B366.16021@groups.io> In-Reply-To: <160144926718B366.16021@groups.io> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.2.0.6 dlp-product: dlpe-windows dlp-reaction: no-action authentication-results: spf=none (sender IP is ) smtp.mailfrom=guomin.jiang@intel.com; x-originating-ip: [192.55.52.200] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 18281853-9630-403c-aad4-08d7db7d8527 x-ms-traffictypediagnostic: DM6PR11MB2729: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:3826; x-forefront-prvs: 0367A50BB1 x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR11MB2955.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(10019020)(396003)(39860400002)(366004)(136003)(376002)(346002)(110136005)(66556008)(52536014)(5660300002)(66446008)(33656002)(76116006)(966005)(66476007)(316002)(478600001)(64756008)(86362001)(26005)(7696005)(55016002)(2906002)(66946007)(8676002)(9686003)(186003)(81156014)(71200400001)(54906003)(53546011)(8936002)(4326008)(81166007)(6506007);DIR:OUT;SFP:1102; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: OLNe9gstgEnKldcScVCZoKX1PCYWKJ/t5KVqpZ5v4oG+sknRITFsi7lPbTnj1hgY2X1Us4CLip4Oxpfozv+iLu2SIQrHwbvVk4LYrJDjDK7ju86u+tWrhbav+xg8vLN12Q17GNroEfcnC59CTAqShLZPuYMG4lZhtISNU40UafmQBGMJsuN/ZuesNUHdE+W6nH0+NCck4zfT6CfmXLTbogof9v8p1YquRSho4Rcuz0+olBqaM1DH6iCynnH0H/LSFWFW19ty/e5TW7ZjRVwxmtg8Jcb1RNnYoQLsT32e+k9Uh0ltGvjQRN/Cx83B7QRPn0cWA0vmXZcOQgW5fN/U7sHmLKS1MqL9Zh1j2IIw3rQnTqgmIaGJ4cy65qCZ41P+CQRg3t72mpTFxzjrCSRhx/+vmtdn3pSiK0D0WwyfNJay4X3VmB1eGzTBJYNHvwaAIbAwcpHzltOj4td7uOBSq/72aY77otKr7zNmC3ST1rJwheMqrQSJs0Dq6b28vRIi3giaYA8vGtH3yMBC/iz3xw== x-ms-exchange-antispam-messagedata: wDBxp9TL4c4haI47DQjf1aXMaxrDaTPN5KS3CxG9Y2aZLO1mMsk6SZauKVn2kMg8lYPq9H7UGmew1aMszJGwCusE6d6aK3rxjQzXzIdY9d0XNZS7QkN1VAuWkmCM7bI8svSxDp8hLj6JQTvlVhBGew== MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 18281853-9630-403c-aad4-08d7db7d8527 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Apr 2020 05:27:24.6109 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 18JIJ2tLXbwqprMV+7TtsHdwDOdQSMXBVMxZSRPQut/KHrPo1npm709nrO23QOxC2e4f71MXM04w6MdMqQkrVw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB2729 Return-Path: guomin.jiang@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Kinney, Sean, Bret, Could you help review the change? Best Regards Guomin > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Guomin > Jiang > Sent: Tuesday, March 31, 2020 11:06 AM > To: devel@edk2.groups.io > Cc: Kinney, Michael D ; Sean Brogan > ; Bret Barkelew > > Subject: [edk2-devel] [PATCH] UnitTestFrameworkPkg/PersistenceLib: > Correct the allocated size. >=20 > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2608 >=20 > According to logic and the practice, it is need to allocate ascii length > by 2 for unicode string. >=20 > Cc: Michael D Kinney > Cc: Sean Brogan > Cc: Bret Barkelew > Signed-off-by: Guomin Jiang > --- > .../UnitTestPersistenceLibSimpleFileSystem.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git > a/UnitTestFrameworkPkg/Library/UnitTestPersistenceLibSimpleFileSystem/ > UnitTestPersistenceLibSimpleFileSystem.c > b/UnitTestFrameworkPkg/Library/UnitTestPersistenceLibSimpleFileSystem/ > UnitTestPersistenceLibSimpleFileSystem.c > index ccca9bfacb..6da85c459d 100644 > --- > a/UnitTestFrameworkPkg/Library/UnitTestPersistenceLibSimpleFileSystem/ > UnitTestPersistenceLibSimpleFileSystem.c > +++ > b/UnitTestFrameworkPkg/Library/UnitTestPersistenceLibSimpleFileSystem/ > UnitTestPersistenceLibSimpleFileSystem.c > @@ -67,7 +67,7 @@ GetCacheFileDevicePath ( > // Before we can start, change test name from ASCII to Unicode. >=20 > // >=20 > CacheFilePathLength =3D AsciiStrLen (Framework->ShortTitle) + 1; >=20 > - TestName =3D AllocatePool (CacheFilePathLength); >=20 > + TestName =3D AllocatePool (CacheFilePathLength * sizeof(CHAR16)); >=20 > if (!TestName) { >=20 > goto Exit; >=20 > } >=20 > -- > 2.25.1.windows.1 >=20 >=20 > -=3D-=3D-=3D-=3D-=3D-=3D > Groups.io Links: You receive all messages sent to this group. >=20 > View/Reply Online (#56714): https://edk2.groups.io/g/devel/message/56714 > Mute This Topic: https://groups.io/mt/72670002/4399222 > Group Owner: devel+owner@edk2.groups.io > Unsubscribe: https://edk2.groups.io/g/devel/unsub > [guomin.jiang@intel.com] > -=3D-=3D-=3D-=3D-=3D-=3D