mirror of https://github.com/acidanthera/audk.git
UefiCpuPkg/PiSmmCpuDxeSmm: Add check for pointer Pml5Entry
The pointer Pml5Entry, returned from call to function AllocatePageTableMemory, may be null. So add check for it. Cc: Eric Dong <eric.dong@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
This commit is contained in:
parent
4ac8ceb5d6
commit
aefcf2f78a
|
@ -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));
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue