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
This commit is contained in:
andrewfish 2010-07-18 17:56:06 +00:00
parent f5e004a3d0
commit 635021c594
1 changed files with 4 additions and 4 deletions

View File

@ -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)) {