summaryrefslogtreecommitdiffstats
path: root/FatPkg
diff options
context:
space:
mode:
authorChen A Chen <chen.a.chen@intel.com>2019-02-01 10:21:27 +0800
committerLiming Gao <liming.gao@intel.com>2019-02-02 21:41:15 +0800
commitaad4e2ec8ffe2aae6bdcdd04f34a1d3b0bf2c4a9 (patch)
treea48dd03e585174d98b8ccf2769fb7334844aefa4 /FatPkg
parent1f7af69d10fa3c88e996d38179d5f985f6c7dfe5 (diff)
downloadedk2-aad4e2ec8ffe2aae6bdcdd04f34a1d3b0bf2c4a9.tar.gz
edk2-aad4e2ec8ffe2aae6bdcdd04f34a1d3b0bf2c4a9.tar.bz2
edk2-aad4e2ec8ffe2aae6bdcdd04f34a1d3b0bf2c4a9.zip
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> Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'FatPkg')
-rw-r--r--FatPkg/FatPei/Gpt.c3
1 files changed, 3 insertions, 0 deletions
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;