[edk2-devel] [PATCH 1/1] UefiCpuPkg/PiSmmCpuDxeSmm: Add check for pointer Pml5Entry
Zhang, Shenglei
shenglei.zhang at intel.com
Wed Jul 31 05:56:30 UTC 2019
The pointer Pml5Entry, returned from call to function
AllocatePageTableMemory, may be null.
So add check for it.
Cc: Eric Dong <eric.dong at intel.com>
Cc: Ray Ni <ray.ni at intel.com>
Cc: Laszlo Ersek <lersek at redhat.com>
Signed-off-by: Shenglei Zhang <shenglei.zhang at intel.com>
---
UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c b/UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c
index a3b62f778741..d7af3b6d7941 100644
--- a/UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c
+++ b/UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c
@@ -375,6 +375,7 @@ SmmInitPageTable (
// Fill PML5 entry
//
Pml5Entry = (UINT64*)AllocatePageTableMemory (1);
+ ASSERT (Pml5Entry != NULL);
*Pml5Entry = (UINTN) Pml4Entry | mAddressEncMask | PAGE_ATTRIBUTE_BITS;
ZeroMem (Pml5Entry + 1, EFI_PAGE_SIZE - sizeof (*Pml5Entry));
//
--
2.18.0.windows.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#44664): https://edk2.groups.io/g/devel/message/44664
Mute This Topic: https://groups.io/mt/32662314/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
More information about the edk2-devel-archive
mailing list