From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.31; helo=mga06.intel.com; envelope-from=jiewen.yao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (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 5546822497F3A for ; Mon, 16 Apr 2018 01:43:18 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Apr 2018 01:43:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,459,1517904000"; d="scan'208";a="51098493" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga002.jf.intel.com with ESMTP; 16 Apr 2018 01:43:17 -0700 Received: from fmsmsx155.amr.corp.intel.com (10.18.116.71) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 16 Apr 2018 01:43:17 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by FMSMSX155.amr.corp.intel.com (10.18.116.71) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 16 Apr 2018 01:43:16 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.239]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.197]) with mapi id 14.03.0319.002; Mon, 16 Apr 2018 16:43:15 +0800 From: "Yao, Jiewen" To: "Zeng, Star" , "edk2-devel@lists.01.org" CC: "Zeng, Star" Thread-Topic: [edk2] [PATCH] MdeModulePkg DxeCapsuleLibFmp: Fix wrong Index is used Thread-Index: AQHT1V7aoHKakyDzHkKSNYw25LikUKQDExkw Date: Mon, 16 Apr 2018 08:43:14 +0000 Message-ID: <74D8A39837DF1E4DA445A8C0B3885C503AB64BC3@SHSMSX104.ccr.corp.intel.com> References: <1523868111-120560-1-git-send-email-star.zeng@intel.com> In-Reply-To: <1523868111-120560-1-git-send-email-star.zeng@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: 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] MdeModulePkg DxeCapsuleLibFmp: Fix wrong Index is used X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Apr 2018 08:43:18 -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: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of St= ar > Zeng > Sent: Monday, April 16, 2018 4:42 PM > To: edk2-devel@lists.01.org > Cc: Yao, Jiewen ; Zeng, Star > Subject: [edk2] [PATCH] MdeModulePkg DxeCapsuleLibFmp: Fix wrong Index is > used >=20 > DEBUG(( > DEBUG_ERROR, > "ItemOffsetList[%d](0x%lx) < ItemOffsetList[%d](0x%x)\n", > Index, > ItemOffsetList[Index], > Index, // Should be Index - 1 > ItemOffsetList[Index - 1] > )); >=20 > Cc: Jiewen Yao > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Star Zeng > --- > MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c > b/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c > index 36e8c26aa976..a5dcb76d5aaa 100644 > --- a/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c > +++ b/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c > @@ -250,7 +250,7 @@ ValidateFmpCapsule ( > // > if (Index > 0) { > if (ItemOffsetList[Index] <=3D ItemOffsetList[Index - 1]) { > - DEBUG((DEBUG_ERROR, "ItemOffsetList[%d](0x%lx) < > ItemOffsetList[%d](0x%x)\n", Index, ItemOffsetList[Index], Index, > ItemOffsetList[Index - 1])); > + DEBUG((DEBUG_ERROR, "ItemOffsetList[%d](0x%lx) < > ItemOffsetList[%d](0x%x)\n", Index, ItemOffsetList[Index], Index - 1, > ItemOffsetList[Index - 1])); > return EFI_INVALID_PARAMETER; > } > } > -- > 2.7.0.windows.1 >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel