public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Guomin Jiang" <guomin.jiang@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
	"Jiang, Guomin" <guomin.jiang@intel.com>
Cc: "Kinney, Michael D" <michael.d.kinney@intel.com>,
	Sean Brogan <sean.brogan@microsoft.com>,
	Bret Barkelew <Bret.Barkelew@microsoft.com>
Subject: Re: [edk2-devel] [PATCH] UnitTestFrameworkPkg/PersistenceLib: Correct the allocated size.
Date: Wed, 8 Apr 2020 05:27:24 +0000	[thread overview]
Message-ID: <DM6PR11MB29553FFAC12499984F6804829DC00@DM6PR11MB2955.namprd11.prod.outlook.com> (raw)
In-Reply-To: <160144926718B366.16021@groups.io>

Hi Kinney, Sean, Bret,

Could you help review the change?

Best Regards
Guomin

> -----Original Message-----
> From: devel@edk2.groups.io <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 <michael.d.kinney@intel.com>; Sean Brogan
> <sean.brogan@microsoft.com>; Bret Barkelew
> <Bret.Barkelew@microsoft.com>
> Subject: [edk2-devel] [PATCH] UnitTestFrameworkPkg/PersistenceLib:
> Correct the allocated size.
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2608
> 
> According to logic and the practice, it is need to allocate ascii length
> by 2 for unicode string.
> 
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Cc: Sean Brogan <sean.brogan@microsoft.com>
> Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
> Signed-off-by: Guomin Jiang <guomin.jiang@intel.com>
> ---
>  .../UnitTestPersistenceLibSimpleFileSystem.c                    | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> 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.
> 
>    //
> 
>    CacheFilePathLength = AsciiStrLen (Framework->ShortTitle) + 1;
> 
> -  TestName = AllocatePool (CacheFilePathLength);
> 
> +  TestName = AllocatePool (CacheFilePathLength * sizeof(CHAR16));
> 
>    if (!TestName) {
> 
>      goto Exit;
> 
>    }
> 
> --
> 2.25.1.windows.1
> 
> 
> -=-=-=-=-=-=
> 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/4399222
> Group Owner: devel+owner@edk2.groups.io
> Unsubscribe: https://edk2.groups.io/g/devel/unsub
> [guomin.jiang@intel.com]
> -=-=-=-=-=-=


       reply	other threads:[~2020-04-08  5:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <160144926718B366.16021@groups.io>
2020-04-08  5:27 ` Guomin Jiang [this message]
2020-04-08  6:02   ` [edk2-devel] [PATCH] UnitTestFrameworkPkg/PersistenceLib: Correct the allocated size Sean

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DM6PR11MB29553FFAC12499984F6804829DC00@DM6PR11MB2955.namprd11.prod.outlook.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox