From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=fail (domain: intel.com, ip: , mailfrom: michael.d.kinney@intel.com) Received: from mga12.intel.com (mga12.intel.com []) by groups.io with SMTP; Wed, 08 May 2019 21:31:17 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 May 2019 21:31:16 -0700 X-ExtLoop1: 1 Received: from unknown (HELO mdkinney-MOBL2.amr.corp.intel.com) ([10.241.98.74]) by orsmga004.jf.intel.com with ESMTP; 08 May 2019 21:31:16 -0700 From: "Michael D Kinney" To: devel@edk2.groups.io Cc: Zailiang Sun , Yi Qian Subject: [Patch 02/16] Vlv2TbltDevicePkg/AcpiPlatform: Change Size type to UINTN Date: Wed, 8 May 2019 21:30:57 -0700 Message-Id: <20190509043111.15272-3-michael.d.kinney@intel.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20190509043111.15272-1-michael.d.kinney@intel.com> References: <20190509043111.15272-1-michael.d.kinney@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Cc: Yi Qian Signed-off-by: Michael D Kinney --- Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c b/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c index 0bd375391e..5c03f66edb 100644 --- a/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c +++ b/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c @@ -1,6 +1,6 @@ /** @file - Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
+ Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent @@ -778,7 +778,7 @@ AcpiPlatformEntryPoint ( EFI_ACPI_COMMON_HEADER *CurrentTable; UINTN TableHandle; UINT32 FvStatus; - UINT32 Size; + UINTN Size; EFI_EVENT Event; EFI_ACPI_TABLE_VERSION TableVersion; UINTN VarSize; @@ -1223,7 +1223,7 @@ AcpiPlatformEntryPoint ( EFI_SECTION_RAW, Instance, (VOID **) &CurrentTable, - (UINTN *) &Size, + &Size, &FvStatus ); -- 2.21.0.windows.1