From ada3f18c41fd75232fd218172e5ea1c7abd8e038 Mon Sep 17 00:00:00 2001 From: rsun3 Date: Fri, 10 Jul 2009 10:03:46 +0000 Subject: [PATCH] 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 --- EdkCompatibilityPkg/Foundation/Library/Pei/Hob/PeiHobLib.c | 1 + 1 file changed, 1 insertion(+) 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);