Reviewed-by: Liming Gao <[email protected]>
> -----Original Message----- > From: edk2-devel [mailto:[email protected]] On Behalf Of Chen A > Chen > Sent: Friday, February 1, 2019 10:21 AM > To: [email protected] > Cc: Wu, Hao A <[email protected]> > 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 <[email protected]> > Cc: Hao Wu <[email protected]> > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Chen A Chen <[email protected]> > --- > 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 > [email protected] > https://lists.01.org/mailman/listinfo/edk2-devel _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

