summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Core/DxeIplPeim
diff options
context:
space:
mode:
authorandrewfish <andrewfish@6f19259b-4bc3-4df7-8a09-765794883524>2010-07-18 17:56:06 +0000
committerandrewfish <andrewfish@6f19259b-4bc3-4df7-8a09-765794883524>2010-07-18 17:56:06 +0000
commit635021c59421db3d837f4e6797c5dc70bbd78b6f (patch)
tree6abe463f187815f9391bde5c82f26994fde95097 /MdeModulePkg/Core/DxeIplPeim
parentf5e004a3d0d9f9ccfef3ab8e5d4ff35baca43d63 (diff)
downloadedk2-platforms-635021c59421db3d837f4e6797c5dc70bbd78b6f.tar.xz
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
Diffstat (limited to 'MdeModulePkg/Core/DxeIplPeim')
-rw-r--r--MdeModulePkg/Core/DxeIplPeim/DxeLoad.c8
1 files 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)) {