diff options
author | qhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-06-07 15:38:52 +0000 |
---|---|---|
committer | qhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-06-07 15:38:52 +0000 |
commit | 533f039eb0bd2a1d5e7f11debb1379b048630021 (patch) | |
tree | 6d247323469c5f91d3e7edf21fb2e26c03f5d793 /MdePkg/Library/PeiHobLib/HobLib.c | |
parent | 8a43e8dd550a3e92238b3c22bb6ea67d41097e86 (diff) | |
download | edk2-533f039eb0bd2a1d5e7f11debb1379b048630021.tar.gz edk2-533f039eb0bd2a1d5e7f11debb1379b048630021.tar.bz2 edk2-533f039eb0bd2a1d5e7f11debb1379b048630021.zip |
BaseMemoryLib:
Correct wrong ASSERT()s on SetMem16(), SetMem32(), SetMem64()
HobLib:
Add Missing ASSERT()s for BuildGuidHobData() since CopyMem() now allow zero source buffer with length > 0.
BasePrintLib
Add ASSERT()s to check NULL buffer and NULL format.
PostCodeLib
Add 3 instances of PostCodeLib and introduce new Pcd for post code property mask.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@438 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Library/PeiHobLib/HobLib.c')
-rw-r--r-- | MdePkg/Library/PeiHobLib/HobLib.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/MdePkg/Library/PeiHobLib/HobLib.c b/MdePkg/Library/PeiHobLib/HobLib.c index 380a735b99..1f0c66acd0 100644 --- a/MdePkg/Library/PeiHobLib/HobLib.c +++ b/MdePkg/Library/PeiHobLib/HobLib.c @@ -275,7 +275,7 @@ BuildResourceDescriptorHob ( for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
If Guid is NULL, then ASSERT().
If there is no additional space for HOB creation, then ASSERT().
- If DataLength > (0x10000 - sizeof (EFI_HOB_TYPE_GUID)), then ASSERT().
+ If DataLength >= (0x10000 - sizeof (EFI_HOB_GUID_TYPE)), then ASSERT().
@param Guid The GUID to tag the customized HOB.
@param DataLength The size of the data payload for the GUID HOB.
@@ -313,7 +313,7 @@ BuildGuidHob ( If Guid is NULL, then ASSERT().
If Data is NULL and DataLength > 0, then ASSERT().
If there is no additional space for HOB creation, then ASSERT().
- If DataLength > (0x10000 - sizeof (EFI_HOB_TYPE_GUID)), then ASSERT().
+ If DataLength >= (0x10000 - sizeof (EFI_HOB_GUID_TYPE)), then ASSERT().
@param Guid The GUID to tag the customized HOB.
@param Data The data to be copied into the data field of the GUID HOB.
@@ -332,6 +332,8 @@ BuildGuidDataHob ( {
VOID *HobData;
+ ASSERT (Data != NULL || DataLength == 0);
+
HobData = BuildGuidHob (Guid, DataLength);
return CopyMem (HobData, Data, DataLength);
|