From nobody Tue Nov 26 06:53:27 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+56714+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+56714+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1585623939; cv=none; d=zohomail.com; s=zohoarc; b=HfM6tLvN8+XRDUiTAkQOAATwAUsJLY6LuNd2UwBK3dou+R33msDJL0WROSDQJpdTdJ1lhamESL1hKX03bE1CnavW9Af/TyPa72JTwS4bm4FqMtjB15AXvTpyos7nLDmoUStRaZXeCOWOy8Allpzu7sXDSOaxz3DStJ0BCjb+cNo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1585623939; h=Content-Transfer-Encoding:Cc:Date:From:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=MiZFPSsZJbzpUpASKqfLKv3bFSaXih9kxl+Lsx1O73k=; b=CIKQ6sEWHs8KiPXKiIWfDMgU8X6fEiWW4rYGiTgSLD9ng251eNpA9eHg9oyuXOYWQ17g4lTzSb2ZXfsVnlrsgFgYA6+wIAvsplhQWR8puztbdkvX+kid/PMEPgm9Mp4cdHOWhs4cG68dkZQ9vtRlXh/cXV8GLvorE/Xo+vRwJSI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+56714+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 1585623939934950.1086894537966; Mon, 30 Mar 2020 20:05:39 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id YzAJYY1788612xNBrFuBOQEV; Mon, 30 Mar 2020 20:05:39 -0700 X-Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mx.groups.io with SMTP id smtpd.web10.2125.1585623939215231796 for ; Mon, 30 Mar 2020 20:05:39 -0700 IronPort-SDR: ABUr2NfMHfxfyCJzjiOEh5Y0dUQzYoSRKTIDk6HdaSZ/agMMAt+JNf58khAZPutxtb88JO/KzR 3BIQg824mXwg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Mar 2020 20:05:38 -0700 IronPort-SDR: b+l53yl9cynbAwjhM7ByXE3pC2+smbat8CMuO7WtddxPkyTkWExUytDaGBh/Go6jPvTmw6P8c4 cIrafmgRfCeg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,326,1580803200"; d="scan'208";a="237562511" X-Received: from guominji-mobl.ccr.corp.intel.com ([10.238.5.173]) by orsmga007.jf.intel.com with ESMTP; 30 Mar 2020 20:05:37 -0700 From: "Guomin Jiang" To: devel@edk2.groups.io Cc: Michael D Kinney , Sean Brogan , Bret Barkelew Subject: [edk2-devel] [PATCH] UnitTestFrameworkPkg/PersistenceLib: Correct the allocated size. Date: Tue, 31 Mar 2020 11:05:36 +0800 Message-Id: <20200331030536.1559-1-guomin.jiang@intel.com> 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,guomin.jiang@intel.com X-Gm-Message-State: dWuqIhulnltu6N1kDtm0MA5mx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1585623939; bh=jUIhEBk5WOIYz6ZEAhCKojQX690zetGClQekvCQ9rJQ=; h=Cc:Date:From:Reply-To:Subject:To; b=xZoBCKpMdYi4WXrLVTAULYd2Ajc3fzAl38bVNvRXbbNTc28GQW+DmwMcOtHCIr/pSrk LRRGlO3DzPE8A31CkTsTjrSl9kMCFGYdSGNDoSjLPkRvTlSII7JAF92vOuxzsx/HFThDc Vh4FduNyHhtA4v5tQCibk+DS27Us5Udq/zc= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2608 According to logic and the practice, it is need to allocate ascii length by 2 for unicode string. 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(-) diff --git a/UnitTestFrameworkPkg/Library/UnitTestPersistenceLibSimpleFileS= ystem/UnitTestPersistenceLibSimpleFileSystem.c b/UnitTestFrameworkPkg/Libra= ry/UnitTestPersistenceLibSimpleFileSystem/UnitTestPersistenceLibSimpleFileS= ystem.c index ccca9bfacb..6da85c459d 100644 --- a/UnitTestFrameworkPkg/Library/UnitTestPersistenceLibSimpleFileSystem/U= nitTestPersistenceLibSimpleFileSystem.c +++ b/UnitTestFrameworkPkg/Library/UnitTestPersistenceLibSimpleFileSystem/U= nitTestPersistenceLibSimpleFileSystem.c @@ -67,7 +67,7 @@ GetCacheFileDevicePath ( // Before we can start, change test name from ASCII to Unicode. // CacheFilePathLength =3D AsciiStrLen (Framework->ShortTitle) + 1; - TestName =3D AllocatePool (CacheFilePathLength); + TestName =3D AllocatePool (CacheFilePathLength * sizeof(CHAR16)); if (!TestName) { goto Exit; } --=20 2.25.1.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 (#56714): https://edk2.groups.io/g/devel/message/56714 Mute This Topic: https://groups.io/mt/72670002/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-