From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mx.groups.io with SMTP id smtpd.web11.3346.1588989529663759850 for ; Fri, 08 May 2020 18:58:49 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=JW5nJM73; spf=pass (domain: intel.com, ip: 134.134.136.100, mailfrom: yunhuax.feng@intel.com) IronPort-SDR: VwT4aJKxRA4maazUOIyZ9nESK/hD5iHhW8zJ+CIA/2hh5voDHs+CLrKN+RjtORG/X+pohyosUA RJHF1LWqBZ4w== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 May 2020 18:58:49 -0700 IronPort-SDR: SpxLhIfw6kCVJeZEJrfTtBIZIkYBiJsRik0PQq0JfCioD3RCfQaZV6hIlKlQPKlm4Od50cB7+N nBGAaFUY0qQg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,369,1583222400"; d="scan'208";a="305652735" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by FMSMGA003.fm.intel.com with ESMTP; 08 May 2020 18:58:49 -0700 Received: from fmsmsx604.amr.corp.intel.com (10.18.126.84) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 8 May 2020 18:58:48 -0700 Received: from fmsmsx604.amr.corp.intel.com (10.18.126.84) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Fri, 8 May 2020 18:58:48 -0700 Received: from FMSEDG002.ED.cps.intel.com (10.1.192.134) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Fri, 8 May 2020 18:58:48 -0700 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.100) by edgegateway.intel.com (192.55.55.69) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 8 May 2020 18:58:48 -0700 Received: from BN8PR11MB3793.namprd11.prod.outlook.com (2603:10b6:408:86::23) by BN8PR11MB3665.namprd11.prod.outlook.com (2603:10b6:408:91::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2958.20; Sat, 9 May 2020 01:58:46 +0000 Received: from BN8PR11MB3793.namprd11.prod.outlook.com ([fe80::6455:7f80:a3b2:730b]) by BN8PR11MB3793.namprd11.prod.outlook.com ([fe80::6455:7f80:a3b2:730b%5]) with mapi id 15.20.2979.033; Sat, 9 May 2020 01:58:46 +0000 From: "Feng, YunhuaX" To: "devel@edk2.groups.io" CC: "Feng, Bob C" , "Gao, Liming" Subject: [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: AdYlpUzbYGIqiayXSXG6NdcZlBf1zA== Date: Sat, 9 May 2020 01:58:46 +0000 Message-ID: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.102.204.45] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 86189d2a-43b7-4c93-d53e-08d7f3bc828a x-ms-traffictypediagnostic: BN8PR11MB3665: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:813; x-forefront-prvs: 03982FDC1D x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: d4cReiyUFcBcpBERVTlEris1gBkypmRAgtqUdotbMbWO9JI9fdQiR9FToAqj7ylX6RrMZ1L8+rwZ4nNWmMC1IOaPZgs6yM4aWGc4mXGHSt33giRRCfGj0i+gczPxpvZl8xAy5ajD/oqRURSeymjfw7i9QgrSRABizlRSM2ugjPMv6kZ8GMy09O4Jb0sNar2ocsRyK44d76o6DNIkvhpU4y11ITgifzxEeC4T+aoHu7EGcO9MRFT+38TRz0r1I1G46SZVIDGY1S6G4D4JBVAEXxIK5w2KFQvWzqEERwWI4afcgOr9k7tAPmd5T6AntzMLAhng0llOxWQToWepCf6R0nRXDBfiCezsehlY+7tlGSK6E3hirU49aUG3gyTS3xCAGh8kd+Op5GowJwFspPcEc2x/Nk7EOgdQ3lOdmBIeQG5fB2MlW7NQU3HJiMPdE9l6TYR44Q/aHMf11+zCw7/KlhlD0wUT3YylVuN7l8Gzs8T/H5e2JW+eR3FImujcZ3GCz3RNpyMfdBJQIq+NaIDT7g== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BN8PR11MB3793.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(346002)(136003)(396003)(376002)(39860400002)(366004)(33430700001)(316002)(8936002)(4744005)(54906003)(33440700001)(8676002)(66446008)(66946007)(64756008)(66476007)(4326008)(71200400001)(76116006)(478600001)(52536014)(86362001)(66556008)(7696005)(186003)(55016002)(6506007)(5660300002)(6916009)(26005)(107886003)(9686003)(33656002)(2906002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: WXE6ZGjIIcTE6Ysj0csPYkDyCZ5WLuzp21LM0o1DrgF5nW0Jw8qNE0kf/6tEwIHsnvXqKFvsyYQFtQAwYdMR/3GEWvgAWJwayJg9C5gMcLob2PqvJvtgWD6anjqzG9GS8uweo5pR39ng/d+qgaKJxZcCD7eZ8J/dPH+pg/ZAya6O+X70xq8Bp+SRJp8XOaBHKMdiqo+vAJkYZjh0uQWb3Z2uCBfIpz6ep2uqC/rq5EStE5xLcvhLI1DLM2NV7XWBiN0eRa6Rne8sOy0oKg7+0WU0+cpCc5WnCyCU4FlFQQ6fEW7tHCcB9GZfLJfQuslNe3nDKRv47KyM+466L5rAfg4yP+BY+99dyFv9IbQLfgwSVMw+4iUk9hpb5fDoObe0yjOxSu+rwwU/p45BtAX/BNzaFMqAPQH0MqHNSGL6jZSfqUG6CswwEhulgy6u3wMkxQ/GWkzpA8ZQTvfXWttDMwdFRNEZjplpaX0myuzyRydQ5b5xxkjvRNcB44i/4LWP arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lAEgPgFk1kLW3mZV0hghz46Px0h2j1+/p+bC15zB4mKZ6GY1SN7oEToIM3CjYIus8qiNB1Wkjoo2v5R7ZMQthXghyJobNGZjSwjvDISzx71xBMghwOZ/PFsufLyVt3At9UFVeAusyuRci3TzYqtb46Lq8iH3Cq6WyO5hNXv6McIkqCum0G3CHgH7ZGODoimu4sl9j59wqfJyY3Jureyr77Uaqpa9S2AYm/RS2hksqFU5YXMfCXdviDh6hOdmi3rv6McHPSl2WBQpCJ+jUqKm+MQfUYXR3eAieBvHHG9pAT5F0UkmhkaO+9s4hTn2gMzm6P9fubST1zItS/UExtNnhg== arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=UQvQ7SBgZ/jxmFp75rl6cC6DOcK0c503mCP8kbkGj8s=; b=LBnDsmBG82oWvWmXqOTOAJ0Gs96nLef9fwCGq7X6ApWXkZVKMsCjSqP/oLziRwzmo5sJiFtQe1dp5aTi9mMKLW0z2P13nNGU/UER1J4uX5OVUekVEs40eigX+bmTbhDm/JXpoU2Hwwm81VW6SAJNOdlNd47+yRb5oZnXWcvDDNnazbycHeNm/8yHFvvmAAgLlFkFFYTLiRBtGaHx4McDZMM0GAU/w3RYnLfTShE0Dy7cis7bvlOjrgRiFTKiNk01KYaQ7nHn0TwKSXbAWJLwyS5ojyWfpH/cG1Pvb883+0P7pHGA85Q6nMhBfQn+n0ERS33vuxRf2cRRI2QWECZdpA== arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=UQvQ7SBgZ/jxmFp75rl6cC6DOcK0c503mCP8kbkGj8s=; b=JW5nJM73yjbDV/vK/rXc1hFUlj2u8czF8D7SK1Qdpdpyx6VB24uzSS9fDjZ9BvLh5bdEifyhvdYDFT+DrBokOvV71u+0lfdBZ3VGegzicAEEsOJE8H301z2sdJJv3tqMzKgOFeeVwERLDeqO8+cgoPZo9Rhfxhiv5r1vKXQVbXM= x-ms-exchange-crosstenant-network-message-id: 86189d2a-43b7-4c93-d53e-08d7f3bc828a x-ms-exchange-crosstenant-originalarrivaltime: 09 May 2020 01:58:46.4143 (UTC) x-ms-exchange-crosstenant-fromentityheader: Hosted x-ms-exchange-crosstenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d x-ms-exchange-crosstenant-mailboxtype: HOSTED x-ms-exchange-crosstenant-userprincipalname: Bir7eZ8xkXCjw4J1CK2db1EOTuMiPW5ZciDPtRiLYlEdqCDBcgR/aW0Casp5ecVSyiC1ATAh317Ip8+UMHZ/tw== x-ms-exchange-transport-crosstenantheadersstamped: BN8PR11MB3665 MIME-Version: 1.0 Return-Path: yunhuax.feng@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable if found the next FFS size equal 0xFFFFFF, return NOT_FOUND Cc: Bob Feng Cc: Liming Gao Signed-off-by: Yunhua Feng --- BaseTools/Source/C/FMMT/FmmtLib.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/BaseTools/Source/C/FMMT/FmmtLib.c b/BaseTools/Source/C/FMMT/Fm= mtLib.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