X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdeModulePkg%2FCore%2FPei%2FFwVol%2FFwVol.c;h=34fe0a1d9e3262ada45814a11d725b0c1cc6f194;hp=958263b522e79f4bc0ad788ab9d085a49f14358f;hb=67a58d0ffddc625bda615b9fb2b335e8d7ab979f;hpb=0c6bbb63f98b5e62f60511cac1cc12c070888191 diff --git a/MdeModulePkg/Core/Pei/FwVol/FwVol.c b/MdeModulePkg/Core/Pei/FwVol/FwVol.c index 958263b522..34fe0a1d9e 100644 --- a/MdeModulePkg/Core/Pei/FwVol/FwVol.c +++ b/MdeModulePkg/Core/Pei/FwVol/FwVol.c @@ -142,8 +142,8 @@ PeiFileHandleToVolume ( PrivateData = PEI_CORE_INSTANCE_FROM_PS_THIS (GetPeiServicesTablePointer ()); for (Index = 0; Index < PrivateData->FvCount; Index++) { FwVolHeader = PrivateData->Fv[Index].FvHeader; - if (((UINT64) FileHandle > (UINT64) FwVolHeader ) && \ - ((UINT64) FileHandle <= ((UINT64) FwVolHeader + FwVolHeader->FvLength - 1))) { + if (((UINT64) (UINTN) FileHandle > (UINT64) (UINTN) FwVolHeader ) && \ + ((UINT64) (UINTN) FileHandle <= ((UINT64) (UINTN) FwVolHeader + FwVolHeader->FvLength - 1))) { *VolumeHandle = (EFI_PEI_FV_HANDLE)FwVolHeader; return TRUE; }