From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mx.groups.io with SMTP id smtpd.web12.3919.1588992347451080600 for ; Fri, 08 May 2020 19:45:47 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.126, mailfrom: ray.ni@intel.com) IronPort-SDR: +WHN55VUXV2wTuLnlfaBl++JXIEeRFdxEiQIWWgXYtCQv8AQuTrWaPR9GYmyYQAxF6icZahysE jOdgisAT16Rg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 May 2020 19:45:46 -0700 IronPort-SDR: MFQ1PZa7l4HHDizEAX/23NuULe2c7ihSuE39GjzGDbnLePA4Xh2TlPKaE4L39Bsft+tjJk+hjP WZjlr/j8rcUw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,370,1583222400"; d="scan'208";a="250633308" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga007.fm.intel.com with ESMTP; 08 May 2020 19:45:46 -0700 Received: from FMSMSX109.amr.corp.intel.com (10.18.116.9) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 8 May 2020 19:45:46 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by fmsmsx109.amr.corp.intel.com (10.18.116.9) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 8 May 2020 19:45:45 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.210]) by shsmsx102.ccr.corp.intel.com ([169.254.2.38]) with mapi id 14.03.0439.000; Sat, 9 May 2020 10:45:42 +0800 From: "Ni, Ray" To: "devel@edk2.groups.io" , "Feng, YunhuaX" CC: "Feng, Bob C" , "Gao, Liming" Subject: Re: [edk2-staging][PATCH] BaseTools/Fmmt: Fix found the next FFS issue Thread-Topic: [edk2-staging][PATCH] BaseTools/Fmmt: Fix found the next FFS issue Thread-Index: AdYlpUzbYGIqiayXSXG6NdcZlBf1zAABoBJA Date: Sat, 9 May 2020 02:45:42 +0000 Message-ID: <734D49CCEBEEF84792F5B80ED585239D5C530A62@SHSMSX104.ccr.corp.intel.com> References: In-Reply-To: Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: ray.ni@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Yunhua, Why the comparison is against 0xFFFFFF not 0xFFFFFFFF? Is there any existing macro that you can use? Thanks, Ray > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Feng, Yun= huaX > Sent: Saturday, May 9, 2020 9:59 AM > To: devel@edk2.groups.io > Cc: Feng, Bob C ; Gao, Liming > Subject: [edk2-devel] [edk2-staging][PATCH] BaseTools/Fmmt: Fix found th= e next FFS issue >=20 > if found the next FFS size equal 0xFFFFFF, return NOT_FOUND >=20 > Cc: Bob Feng > Cc: Liming Gao >=20 > Signed-off-by: Yunhua Feng > --- > BaseTools/Source/C/FMMT/FmmtLib.c | 3 +++ > 1 file changed, 3 insertions(+) >=20 > diff --git a/BaseTools/Source/C/FMMT/FmmtLib.c b/BaseTools/Source/C/FMMT= /FmmtLib.c > index cdbee3d629..4fb10ecfe6 100644 > --- a/BaseTools/Source/C/FMMT/FmmtLib.c > +++ b/BaseTools/Source/C/FMMT/FmmtLib.c > @@ -1769,10 +1769,13 @@ FvBufFindNextFile ( > (*Key + sizeof (*fhdr)) < fvSize; > *Key =3D (UINTN)ALIGN_POINTER (*Key, 8) > ) { > fhdr =3D (EFI_FFS_FILE_HEADER*) ((UINT8*)hdr + *Key); > fsize =3D GetFfsFileLength (fhdr); > + if (fsize =3D=3D 0xffffff) { > + break; > + } > if (!EFI_TEST_FFS_ATTRIBUTES_BIT( > FvbAttributes, > fhdr->State, > EFI_FILE_HEADER_VALID > ) || > -- > 2.12.2.windows.2 >=20 >=20 >=20