summaryrefslogtreecommitdiff
path: root/IntelFrameworkModulePkg/Library/LzmaCustomDecompressLib/GuidedSectionExtraction.c
diff options
context:
space:
mode:
Diffstat (limited to 'IntelFrameworkModulePkg/Library/LzmaCustomDecompressLib/GuidedSectionExtraction.c')
-rw-r--r--IntelFrameworkModulePkg/Library/LzmaCustomDecompressLib/GuidedSectionExtraction.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/IntelFrameworkModulePkg/Library/LzmaCustomDecompressLib/GuidedSectionExtraction.c b/IntelFrameworkModulePkg/Library/LzmaCustomDecompressLib/GuidedSectionExtraction.c
index ff91600afd..37dbca0ef0 100644
--- a/IntelFrameworkModulePkg/Library/LzmaCustomDecompressLib/GuidedSectionExtraction.c
+++ b/IntelFrameworkModulePkg/Library/LzmaCustomDecompressLib/GuidedSectionExtraction.c
@@ -73,7 +73,7 @@ LzmaGuidedSectionGetInfo (
return LzmaUefiDecompressGetInfo (
(UINT8 *) InputSection + ((EFI_GUID_DEFINED_SECTION *) InputSection)->DataOffset,
- (*(UINT32 *) (((EFI_COMMON_SECTION_HEADER *) InputSection)->Size) & 0x00ffffff) - ((EFI_GUID_DEFINED_SECTION *) InputSection)->DataOffset,
+ SECTION_SIZE (InputSection) - ((EFI_GUID_DEFINED_SECTION *) InputSection)->DataOffset,
OutputBufferSize,
ScratchBufferSize
);
@@ -137,6 +137,7 @@ LzmaGuidedSectionExtraction (
return LzmaUefiDecompress (
(UINT8 *) InputSection + ((EFI_GUID_DEFINED_SECTION *) InputSection)->DataOffset,
+ SECTION_SIZE (InputSection) - ((EFI_GUID_DEFINED_SECTION *) InputSection)->DataOffset,
*OutputBuffer,
ScratchBuffer
);