]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Vlv2TbltDevicePkg/AcpiPlatform: Change Size type to UINTN
authorMichael D Kinney <michael.d.kinney@intel.com>
Wed, 8 May 2019 21:38:47 +0000 (14:38 -0700)
committerMichael D Kinney <michael.d.kinney@intel.com>
Fri, 10 May 2019 02:58:05 +0000 (19:58 -0700)
Change the type of the local variable Size in the function
AcpiPlatformEntryPoint() from UINT32 to UINTN.  This local
variable is passed into the function ReadSection() that returns
a value of type UINTN.  Using type UINT32 can potentially
corrupt an adjacent local on the stack.

Cc: Zailiang Sun <zailiang.sun@intel.com>
Cc: Yi Qian <yi.qian@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Zailiang Sun <zailiang.sun@intel.com>
Reviewed-by: Yi Qian <yi.qian@intel.com>
Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c

index 0bd375391e8b67cc6912720b737b7848116518bb..5c03f66edb3b26c1990084d4bfdb812dc99a2103 100644 (file)
@@ -1,6 +1,6 @@
 /** @file\r
 \r
-  Copyright (c) 2004  - 2018, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2004  - 2019, Intel Corporation. All rights reserved.<BR>\r
 \r
 \r
   SPDX-License-Identifier: BSD-2-Clause-Patent\r
@@ -778,7 +778,7 @@ AcpiPlatformEntryPoint (
   EFI_ACPI_COMMON_HEADER        *CurrentTable;\r
   UINTN                         TableHandle;\r
   UINT32                        FvStatus;\r
-  UINT32                        Size;\r
+  UINT                        Size;\r
   EFI_EVENT                     Event;\r
   EFI_ACPI_TABLE_VERSION        TableVersion;\r
   UINTN                         VarSize;\r
@@ -1223,7 +1223,7 @@ AcpiPlatformEntryPoint (
                       EFI_SECTION_RAW,\r
                       Instance,\r
                       (VOID **) &CurrentTable,\r
-                      (UINTN *) &Size,\r
+                      &Size,\r
                       &FvStatus\r
                       );\r
 \r