diff options
author | Chen A Chen <chen.a.chen@intel.com> | 2019-02-01 10:21:27 +0800 |
---|---|---|
committer | Liming Gao <liming.gao@intel.com> | 2019-02-02 21:41:15 +0800 |
commit | aad4e2ec8ffe2aae6bdcdd04f34a1d3b0bf2c4a9 (patch) | |
tree | a48dd03e585174d98b8ccf2769fb7334844aefa4 /FatPkg | |
parent | 1f7af69d10fa3c88e996d38179d5f985f6c7dfe5 (diff) | |
download | edk2-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.c | 3 |
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;
|