mirror of
https://github.com/utmapp/edk2.git
synced 2026-12-01 14:00:40 -10:00
When setting mVirtualMap to NULL also set mVirtualMapMaxIndex to 0. Without that RuntimeDriverConvertPointer() will go search the ZeroPage for EFI_MEMORY_DESCRIPTOR entries. In case mVirtualMapMaxIndex happens to be small small enough that'll go unnoticed, the search will not find anything and EFI_NOT_FOUND will be returned. In case mVirtualMapMaxIndex is big enough the search will reach the end of the ZeroPage and trigger a page fault. Signed-off-by: Gerd Hoffmann <[email protected]> Reviewed-by: Liming Gao <[email protected]>