Fix calculation of first section in FileFindSection for FILE2 headers in UefiPayloadEntry module.
Signed-of-by: Sebastian Witt <sebastian.witt@siemens.com>
---
UefiPayloadPkg/UefiPayloadEntry/LoadDxeCore.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/UefiPayloadPkg/UefiPayloadEntry/LoadDxeCore.c b/UefiPayloadPkg/UefiPayloadEntry/LoadDxeCore.c
index 898d610951..9cb6edefcf 100644
--- a/UefiPayloadPkg/UefiPayloadEntry/LoadDxeCore.c
+++ b/UefiPayloadPkg/UefiPayloadEntry/LoadDxeCore.c
@@ -211,13 +211,14 @@ FileFindSection (
if (IS_FFS_FILE2 (FileHeader)) {
FileSize = FFS_FILE2_SIZE (FileHeader);
+ Section = (EFI_COMMON_SECTION_HEADER *)(((EFI_FFS_FILE_HEADER2 *)FileHeader) + 1);
} else {
FileSize = FFS_FILE_SIZE (FileHeader);
+ Section = (EFI_COMMON_SECTION_HEADER *)(FileHeader + 1);
}
FileSize -= sizeof (EFI_FFS_FILE_HEADER);
- Section = (EFI_COMMON_SECTION_HEADER *)(FileHeader + 1);
Index = 0;
while (Index < FileSize) {
if (Section->Type == SectionType) {
--
2.39.2
You receive all messages sent to this group.
View/Reply Online (#119472) |
|
Mute This Topic
| New Topic
Your Subscription |
Contact Group Owner |
Unsubscribe
[rebecca@openfw.io]