X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdeModulePkg%2FLibrary%2FDxeCapsuleLibFmp%2FDxeCapsuleLib.c;h=7f500a96ebe38f945166e6faafe4f4050bd001c3;hp=d7abcc879b5abdba7a520efc8f705ae90b38c7ad;hb=16f6922709952c7ad468dcdee6ef94b3e5a3cd90;hpb=95ba3d92dca2616715e2af89d2bbeca9577a3e2c diff --git a/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c b/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c index d7abcc879b..7f500a96eb 100644 --- a/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c +++ b/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c @@ -585,7 +585,7 @@ DisplayCapsuleImage ( EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput; ImagePayload = (DISPLAY_DISPLAY_PAYLOAD *)(CapsuleHeader + 1); - PayloadSize = (UINTN)(CapsuleHeader->CapsuleImageSize - sizeof(EFI_CAPSULE_HEADER)); + PayloadSize = CapsuleHeader->CapsuleImageSize - sizeof(EFI_CAPSULE_HEADER); if (ImagePayload->Version != 1) { return EFI_UNSUPPORTED; @@ -733,7 +733,7 @@ DumpFmpCapsule ( for (Index = 0; Index < FmpCapsuleHeader->EmbeddedDriverCount; Index++) { DEBUG((DEBUG_VERBOSE, " ItemOffsetList[%d] - 0x%lx\n", Index, ItemOffsetList[Index])); } - for (; Index < (UINTN)(FmpCapsuleHeader->EmbeddedDriverCount + FmpCapsuleHeader->PayloadItemCount); Index++) { + for (; Index < (UINT32)FmpCapsuleHeader->EmbeddedDriverCount + FmpCapsuleHeader->PayloadItemCount; Index++) { DEBUG((DEBUG_VERBOSE, " ItemOffsetList[%d] - 0x%lx\n", Index, ItemOffsetList[Index])); ImageHeader = (EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER *)((UINT8 *)FmpCapsuleHeader + ItemOffsetList[Index]);