mirror of https://github.com/acidanthera/audk.git
EmbeddedPkg/PrePiLib: Ensure the FFS files are always 8-byte aligned
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> Reviewed-by: Ronald Cron <Ronald.Cron@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17308 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
0b1b3bda4d
commit
5a44a766b5
|
@ -209,6 +209,9 @@ FindFileEx (
|
|||
FfsFileHeader = (EFI_FFS_FILE_HEADER *)((UINT8 *)*FileHeader + FileOccupiedSize);
|
||||
}
|
||||
|
||||
// FFS files begin with a header that is aligned on an 8-byte boundary
|
||||
FfsFileHeader = ALIGN_POINTER (FfsFileHeader, 8);
|
||||
|
||||
FileOffset = (UINT32) ((UINT8 *)FfsFileHeader - (UINT8 *)FwVolHeader);
|
||||
ASSERT (FileOffset <= 0xFFFFFFFF);
|
||||
|
||||
|
|
Loading…
Reference in New Issue