From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.31, mailfrom: zailiang.sun@intel.com) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by groups.io with SMTP; Thu, 09 May 2019 01:15:11 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 May 2019 01:15:10 -0700 X-ExtLoop1: 1 Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga001.jf.intel.com with ESMTP; 09 May 2019 01:15:10 -0700 Received: from fmsmsx157.amr.corp.intel.com (10.18.116.73) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 9 May 2019 01:15:09 -0700 Received: from shsmsx107.ccr.corp.intel.com (10.239.4.96) by FMSMSX157.amr.corp.intel.com (10.18.116.73) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 9 May 2019 01:15:09 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.33]) by SHSMSX107.ccr.corp.intel.com ([169.254.9.7]) with mapi id 14.03.0415.000; Thu, 9 May 2019 16:15:08 +0800 From: "Sun, Zailiang" To: "Kinney, Michael D" , "devel@edk2.groups.io" CC: "Qian, Yi" Subject: Re: [Patch 02/16] Vlv2TbltDevicePkg/AcpiPlatform: Change Size type to UINTN Thread-Topic: [Patch 02/16] Vlv2TbltDevicePkg/AcpiPlatform: Change Size type to UINTN Thread-Index: AQHVBiARC6OxsDJ5v0+77hbIhJD9A6ZiclIw Date: Thu, 9 May 2019 08:15:07 +0000 Message-ID: <7CB7EF03E15B5D48981329A508747A9850C62F5E@SHSMSX104.ccr.corp.intel.com> References: <20190509043111.15272-1-michael.d.kinney@intel.com> <20190509043111.15272-3-michael.d.kinney@intel.com> In-Reply-To: <20190509043111.15272-3-michael.d.kinney@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: zailiang.sun@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Zailiang Sun > -----Original Message----- > From: Kinney, Michael D > Sent: Thursday, May 9, 2019 12:31 PM > To: devel@edk2.groups.io > Cc: Sun, Zailiang ; Qian, Yi > Subject: [Patch 02/16] Vlv2TbltDevicePkg/AcpiPlatform: Change Size type t= o > UINTN >=20 > Change the type of the local variable Size in the function > AcpiPlatformEntryPoint() from UINT32 to UINTN. This local variable is pa= ssed > into the function ReadSection() that returns a value of type UINTN. Usin= g > type UINT32 can potentially corrupt an adjacent local on the stack. >=20 > Cc: Zailiang Sun > Cc: Yi Qian > Signed-off-by: Michael D Kinney > --- > Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) >=20 > 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 >=20 > - Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved. > + Copyright (c) 2004 - 2019, Intel Corporation. All rights > + reserved.
>=20 >=20 > 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 > ); >=20 > -- > 2.21.0.windows.1