public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Gao, Liming" <liming.gao@intel.com>
To: "Chen, Chen A" <chen.a.chen@intel.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "Wu, Hao A" <hao.a.wu@intel.com>
Subject: Re: [PATCH] FatPkg/FatPei/Gpt.c: Fix uninitialized variable issue
Date: Sat, 2 Feb 2019 05:20:30 +0000	[thread overview]
Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E3D5000@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <20190201022127.10036-1-chen.a.chen@intel.com>

Reviewed-by: Liming Gao <liming.gao@intel.com>

> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Chen A Chen
> Sent: Friday, February 1, 2019 10:21 AM
> To: edk2-devel@lists.01.org
> Cc: Wu, Hao A <hao.a.wu@intel.com>
> Subject: [edk2] [PATCH] FatPkg/FatPei/Gpt.c: Fix uninitialized variable issue
> 
> Uninitialized pointer variable may randomly point to a block of memory.
> In This case, FreePool function will free a block of memory that is not
> belongs to this function.
> 
> Cc: Ruiyu Ni <ray.ni@intel.com>
> Cc: Hao Wu <hao.a.wu@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Chen A Chen <chen.a.chen@intel.com>
> ---
>  FatPkg/FatPei/Gpt.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/FatPkg/FatPei/Gpt.c b/FatPkg/FatPei/Gpt.c
> index c3afb668d7..bba33c5bfd 100644
> --- a/FatPkg/FatPei/Gpt.c
> +++ b/FatPkg/FatPei/Gpt.c
> @@ -244,6 +244,9 @@ PartitionCheckGptEntryArray (
>    UINTN                           Index2;
>    EFI_PARTITION_ENTRY             *Entry;
> 
> +  PartitionEntryBuffer = NULL;
> +  PartitionEntryStatus = NULL;
> +
>    ParentBlockDev  = &(PrivateData->BlockDevice[ParentBlockDevNo]);
>    Found           = FALSE;
> 
> --
> 2.16.2.windows.1
> 
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel


      reply	other threads:[~2019-02-02  5:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-01  2:21 [PATCH] FatPkg/FatPei/Gpt.c: Fix uninitialized variable issue Chen A Chen
2019-02-02  5:20 ` Gao, Liming [this message]

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=4A89E2EF3DFEDB4C8BFDE51014F606A14E3D5000@SHSMSX104.ccr.corp.intel.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