public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-staging][PATCH] BaseTools/Fmmt: Fix found the next FFS issue
@ 2020-05-09  1:58 Feng, YunhuaX
  2020-05-09  2:41 ` Liming Gao
  2020-05-09  2:45 ` Ni, Ray
  0 siblings, 2 replies; 6+ messages in thread
From: Feng, YunhuaX @ 2020-05-09  1:58 UTC (permalink / raw)
  To: devel@edk2.groups.io; +Cc: Feng, Bob C, Gao, Liming

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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-05-09  4:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-09  1:58 [edk2-staging][PATCH] BaseTools/Fmmt: Fix found the next FFS issue Feng, YunhuaX
2020-05-09  2:41 ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox