From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.151; helo=mga17.intel.com; envelope-from=jiewen.yao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 6F39D2214673A for ; Wed, 21 Mar 2018 17:13:00 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Mar 2018 17:19:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,341,1517904000"; d="scan'208";a="35784798" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by FMSMGA003.fm.intel.com with ESMTP; 21 Mar 2018 17:19:31 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 21 Mar 2018 17:19:31 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.80]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.129]) with mapi id 14.03.0319.002; Thu, 22 Mar 2018 08:19:29 +0800 From: "Yao, Jiewen" To: "Kinney, Michael D" , "edk2-devel@lists.01.org" CC: "Zeng, Star" , "Dong, Eric" Thread-Topic: [Patch 1/2] MdeModulePkg/CapsuleApp: Fix logic bug in CleanGatherList() Thread-Index: AQHTwVl8XyA4YzHqNkqFjjo7IwU0AqPbZCPA Date: Thu, 22 Mar 2018 00:19:28 +0000 Message-ID: <74D8A39837DF1E4DA445A8C0B3885C503AB0B3C1@shsmsx102.ccr.corp.intel.com> References: <20180321211325.16388-1-michael.d.kinney@intel.com> <20180321211325.16388-2-michael.d.kinney@intel.com> In-Reply-To: <20180321211325.16388-2-michael.d.kinney@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMjkzZWE2YzUtMTRkNy00MTI3LWI0MDMtM2I5MTI0YjA3MjNmIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjIuNS4xOCIsIlRydXN0ZWRMYWJlbEhhc2giOiJSa2M4YkFHYXdZS1wvcStidTdMUGR4SW96NmhUVTdRRzZOY3ZhdWRQNUZnbm1ZZWF2M1M2XC9mRW5nMGhKR0NPXC9CIn0= x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [Patch 1/2] MdeModulePkg/CapsuleApp: Fix logic bug in CleanGatherList() X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Mar 2018 00:13:00 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: jiewen.yao@intel.com > -----Original Message----- > From: Kinney, Michael D > Sent: Thursday, March 22, 2018 5:13 AM > To: edk2-devel@lists.01.org > Cc: Yao, Jiewen ; Zeng, Star ; > Dong, Eric > Subject: [Patch 1/2] MdeModulePkg/CapsuleApp: Fix logic bug in > CleanGatherList() >=20 > https://bugzilla.tianocore.org/show_bug.cgi?id=3D905 >=20 > Fix pointer math when more than one capsule is passed > to the CapsuleApp. Use the ContinuationPointer from > the last array entry instead of the first array entry. >=20 > Cc: Jiewen Yao > Cc: Star Zeng > Cc: Eric Dong > Signed-off-by: Michael D Kinney > Contributed-under: TianoCore Contribution Agreement 1.1 > --- > MdeModulePkg/Application/CapsuleApp/CapsuleApp.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git a/MdeModulePkg/Application/CapsuleApp/CapsuleApp.c > b/MdeModulePkg/Application/CapsuleApp/CapsuleApp.c > index 393cfe5060..b9ff812179 100644 > --- a/MdeModulePkg/Application/CapsuleApp/CapsuleApp.c > +++ b/MdeModulePkg/Application/CapsuleApp/CapsuleApp.c > @@ -1,7 +1,7 @@ > /** @file > A shell application that triggers capsule update process. >=20 > - Copyright (c) 2016 - 2017, Intel Corporation. All rights reserved.
> + Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.
> This program and the accompanying materials > are licensed and made available under the terms and conditions of the = BSD > License > which accompanies this distribution. The full text of the license may= be > found at > @@ -653,7 +653,7 @@ CleanGatherList ( > break; > } >=20 > - TempBlockPtr2 =3D (VOID *) ((UINTN) > TempBlockPtr->Union.ContinuationPointer); > + TempBlockPtr2 =3D (VOID *) ((UINTN) > TempBlockPtr[Index].Union.ContinuationPointer); > FreePool(TempBlockPtr1); > TempBlockPtr1 =3D TempBlockPtr2; > } > -- > 2.14.2.windows.3