]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFrameworkModulePkg/Library/LzmaCustomDecompressLib/GuidedSectionExtraction.c
IntelFrameworkModulePkg: Add IsaFloppyPei driver
[mirror_edk2.git] / IntelFrameworkModulePkg / Library / LzmaCustomDecompressLib / GuidedSectionExtraction.c
index ff91600afd991008b18892359023a80adb199e36..0f8b3f755fd01ba2c174ca0c947638806323a228 100644 (file)
@@ -3,8 +3,8 @@
   It wraps Lzma decompress interfaces to GUIDed Section Extraction interfaces\r
   and registers them into GUIDed handler table.\r
 \r
-  Copyright (c) 2009, Intel Corporation<BR>\r
-  All rights reserved. This program and the accompanying materials\r
+  Copyright (c) 2009, Intel Corporation. All rights reserved.<BR>\r
+  This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
   http://opensource.org/licenses/bsd-license.php\r
@@ -73,7 +73,7 @@ LzmaGuidedSectionGetInfo (
 \r
   return LzmaUefiDecompressGetInfo (\r
           (UINT8 *) InputSection + ((EFI_GUID_DEFINED_SECTION *) InputSection)->DataOffset,\r
-          (*(UINT32 *) (((EFI_COMMON_SECTION_HEADER *) InputSection)->Size) & 0x00ffffff) - ((EFI_GUID_DEFINED_SECTION *) InputSection)->DataOffset,\r
+          SECTION_SIZE (InputSection) - ((EFI_GUID_DEFINED_SECTION *) InputSection)->DataOffset,\r
           OutputBufferSize,\r
           ScratchBufferSize\r
           );\r
@@ -137,6 +137,7 @@ LzmaGuidedSectionExtraction (
 \r
   return LzmaUefiDecompress (\r
     (UINT8 *) InputSection + ((EFI_GUID_DEFINED_SECTION *) InputSection)->DataOffset,\r
+    SECTION_SIZE (InputSection) - ((EFI_GUID_DEFINED_SECTION *) InputSection)->DataOffset,\r
     *OutputBuffer,\r
     ScratchBuffer\r
     );\r