From 635021c59421db3d837f4e6797c5dc70bbd78b6f Mon Sep 17 00:00:00 2001 From: andrewfish Date: Sun, 18 Jul 2010 17:56:06 +0000 Subject: Fix 64-bit bug in DxeIpl. You can't cast an & UINT64 to a UINT32 *, as the upper 32-bits do not get updated. In my case there was data on the stack for the upper 32-bits and it caused the size to be greater than 4GB. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10659 6f19259b-4bc3-4df7-8a09-765794883524 --- MdeModulePkg/Core/DxeIplPeim/DxeLoad.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c b/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c index 69bae0444f..87fc18cfae 100644 --- a/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c +++ b/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c @@ -510,10 +510,10 @@ Decompress ( EFI_STATUS Status; UINT8 *DstBuffer; UINT8 *ScratchBuffer; - UINTN DstBufferSize; + UINT32 DstBufferSize; UINT32 ScratchBufferSize; EFI_COMMON_SECTION_HEADER *Section; - UINTN SectionLength; + UINT32 SectionLength; if (CompressionSection->CommonHeader.Type != EFI_SECTION_COMPRESSION) { ASSERT (FALSE); @@ -535,8 +535,8 @@ Decompress ( // Status = UefiDecompressGetInfo ( (UINT8 *) ((EFI_COMPRESSION_SECTION *) Section + 1), - (UINT32) SectionLength - sizeof (EFI_COMPRESSION_SECTION), - (UINT32 *) &DstBufferSize, + SectionLength - sizeof (EFI_COMPRESSION_SECTION), + &DstBufferSize, &ScratchBufferSize ); if (EFI_ERROR (Status)) { -- cgit v1.2.3