summaryrefslogtreecommitdiff
path: root/EdkCompatibilityPkg
diff options
context:
space:
mode:
authorrsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524>2009-07-10 10:03:46 +0000
committerrsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524>2009-07-10 10:03:46 +0000
commitada3f18c41fd75232fd218172e5ea1c7abd8e038 (patch)
tree652aedef03e513103088ea232d0d2ab2da55aac0 /EdkCompatibilityPkg
parent66e1951f49895d87493fccb52b699b599be55ca5 (diff)
downloadedk2-platforms-ada3f18c41fd75232fd218172e5ea1c7abd8e038.tar.xz
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
Diffstat (limited to 'EdkCompatibilityPkg')
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/Pei/Hob/PeiHobLib.c1
1 files changed, 1 insertions, 0 deletions
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);