From: rsun3 Date: Fri, 10 Jul 2009 10:03:46 +0000 (+0000) Subject: Fix a bug in BuidHobGuidType() of PeiHobLib that it does not adjust the hob length... X-Git-Tag: edk2-stable201903~17436 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=ada3f18c41fd75232fd218172e5ea1c7abd8e038 Fix a bug in BuidHobGuidType() of PeiHobLib that it does not adjust the hob length to be multiple of 8. This does not follow the spec. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8873 6f19259b-4bc3-4df7-8a09-765794883524 --- diff --git a/EdkCompatibilityPkg/Foundation/Library/Pei/Hob/PeiHobLib.c b/EdkCompatibilityPkg/Foundation/Library/Pei/Hob/PeiHobLib.c index 6612fc47db..130ce6d991 100644 --- a/EdkCompatibilityPkg/Foundation/Library/Pei/Hob/PeiHobLib.c +++ b/EdkCompatibilityPkg/Foundation/Library/Pei/Hob/PeiHobLib.c @@ -273,6 +273,7 @@ Returns: Hob.Header->HobType = EFI_HOB_TYPE_GUID_EXTENSION; Length = sizeof(EFI_HOB_GUID_TYPE) + BufferSize; + Length = (Length + 0x7) & (~0x7); Hob.Header->HobLength = (UINT16)Length; CopyMem(&Hob.Guid->Name, Guid, sizeof(EFI_GUID)); CopyMem(Hob.Raw + sizeof(EFI_HOB_GUID_TYPE), Buffer, BufferSize);