]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkCompatibilityPkg/Foundation/Library/Pei/Hob/PeiHobLib.c
Fix a bug in BuidHobGuidType() of PeiHobLib that it does not adjust the hob length...
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Library / Pei / Hob / PeiHobLib.c
index 6612fc47db0660295533cbb7294355e0418584bf..130ce6d991d9b38b6530cdf5500c26f58b526f77 100644 (file)
@@ -273,6 +273,7 @@ Returns:
 \r
   Hob.Header->HobType = EFI_HOB_TYPE_GUID_EXTENSION;\r
   Length              = sizeof(EFI_HOB_GUID_TYPE) + BufferSize;\r
+  Length              = (Length + 0x7) & (~0x7);\r
   Hob.Header->HobLength  = (UINT16)Length;\r
   CopyMem(&Hob.Guid->Name, Guid, sizeof(EFI_GUID));\r
   CopyMem(Hob.Raw + sizeof(EFI_HOB_GUID_TYPE), Buffer, BufferSize);\r