public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Feng, YunhuaX" <yunhuax.feng@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: "Feng, Bob C" <bob.c.feng@intel.com>,
	"Gao, Liming" <liming.gao@intel.com>
Subject: [edk2-staging][PATCH] BaseTools/Fmmt: Fix found the next FFS issue
Date: Sat, 9 May 2020 01:58:46 +0000	[thread overview]
Message-ID: <BN8PR11MB3793D48BCA417774A8F610C58DA30@BN8PR11MB3793.namprd11.prod.outlook.com> (raw)

if found the next FFS size equal 0xFFFFFF, return NOT_FOUND

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>

Signed-off-by: Yunhua Feng <yunhuax.feng@intel.com>
---
 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/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 = (UINTN)ALIGN_POINTER (*Key, 8)
     ) {
     fhdr = (EFI_FFS_FILE_HEADER*) ((UINT8*)hdr + *Key);
     fsize = GetFfsFileLength (fhdr);
+    if (fsize == 0xffffff) {
+      break;
+    }
     if (!EFI_TEST_FFS_ATTRIBUTES_BIT(
           FvbAttributes,
           fhdr->State,
           EFI_FILE_HEADER_VALID
         ) ||
--
2.12.2.windows.2


             reply	other threads:[~2020-05-09  1:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-09  1:58 Feng, YunhuaX [this message]
2020-05-09  2:41 ` [edk2-staging][PATCH] BaseTools/Fmmt: Fix found the next FFS issue Liming Gao
2020-05-09  2:45 ` Ni, Ray
2020-05-09  3:20   ` Feng, YunhuaX
2020-05-09  3:28     ` Ni, Ray
2020-05-09  4:55       ` [edk2-devel] " Feng, YunhuaX

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BN8PR11MB3793D48BCA417774A8F610C58DA30@BN8PR11MB3793.namprd11.prod.outlook.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox