]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Core/DxeIplPeim/DxeLoad.c
Correct parameter UINTN to UINT32. Fix UINTN conver to UINT32
[mirror_edk2.git] / MdeModulePkg / Core / DxeIplPeim / DxeLoad.c
index e7359e5684824bc7e04ee754792cbbd6df428011..901b061973965052b64f332de182b40dadeb16a1 100644 (file)
@@ -647,7 +647,7 @@ Returns:
   EFI_STATUS                      Status;\r
   UINT8                           *DstBuffer;\r
   UINT8                           *ScratchBuffer;\r
-  UINT32                          DstBufferSize;\r
+  UINT                          DstBufferSize;\r
   UINT32                          ScratchBufferSize;\r
   EFI_COMMON_SECTION_HEADER       *CmpSection;\r
   UINTN                           CmpSectionLength;\r
@@ -736,6 +736,7 @@ Returns:
         DEBUG ((EFI_D_ERROR, "Extract section content failed - %r\n", Status));\r
         return Status;\r
       }\r
+      \r
       //\r
       // Todo check AuthenticationStatus and do the verify\r
       //\r
@@ -754,7 +755,7 @@ Returns:
         Status = UefiDecompressGetInfo (\r
                    (UINT8 *) ((EFI_COMPRESSION_SECTION *) Section + 1),\r
                    (UINT32) SectionLength - sizeof (EFI_COMPRESSION_SECTION),\r
-                   &DstBufferSize,\r
+                   (UINT32 *) &DstBufferSize,\r
                    &ScratchBufferSize\r
                    );\r
         if (EFI_ERROR (Status)) {\r
@@ -958,7 +959,8 @@ CustomDecompressExtractSection (
   EFI_STATUS      Status;\r
   UINT8           *ScratchBuffer;\r
   UINT32          ScratchSize;\r
-  UINT32          SectionLength;  \r
+  UINT32          SectionLength;\r
+  UINT32          DestinationSize;  \r
   \r
   //\r
   // Set authentic value to zero.\r
@@ -975,7 +977,7 @@ CustomDecompressExtractSection (
              (GUID *) ((UINT8 *) InputSection + sizeof (EFI_COMMON_SECTION_HEADER)),\r
              (UINT8 *) InputSection + sizeof (EFI_GUID_DEFINED_SECTION),\r
              SectionLength - sizeof (EFI_GUID_DEFINED_SECTION),\r
-             OutputSize,\r
+             &DestinationSize,\r
              &ScratchSize\r
              );\r
   if (EFI_ERROR (Status)) {\r
@@ -996,6 +998,7 @@ CustomDecompressExtractSection (
   //\r
   // Allocate destination buffer\r
   //\r
+  *OutputSize   = (UINTN) DestinationSize;\r
   *OutputBuffer = AllocatePages (EFI_SIZE_TO_PAGES (*OutputSize));\r
   if (*OutputBuffer == NULL) {\r
     return EFI_OUT_OF_RESOURCES;\r