diff options
author | qhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-06-04 13:08:25 +0000 |
---|---|---|
committer | qhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-06-04 13:08:25 +0000 |
commit | 9a462b415d8c9636bfb29a2cfb141e69c3c092b7 (patch) | |
tree | 1f8b1a82190a60a8d00919ab0349a2deab9f2ce3 /MdePkg/Library/PeiMemoryAllocationLib/MemoryAllocationLib.c | |
parent | 8840ad589e758e0aa57982f5b7acfa898c63c409 (diff) | |
download | edk2-platforms-9a462b415d8c9636bfb29a2cfb141e69c3c092b7.tar.xz |
UefiLib:
Add two new interfaces of EfiCreateEventLegacyBootEx & EfiCreateEventReadyToBootEx
Fix a bug in EfiCreateEventLegacyBoot & EfiCreateEventReadyToBoot. (#51)
PciLib:
Add missing ASSERT()s in PciReadBuffer() & PciWriteBuffer() (#70)
IoLib
Add ASSERT()s to check alignment.
MemoryAllocationLib:
For AllocateXXXCopyBuffer(). Add ASSERT()s for cases when allocations fails.
BaseLib:
Change the return type of InternalMathModU64x32 from UINT64 to UINT32
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@416 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Library/PeiMemoryAllocationLib/MemoryAllocationLib.c')
-rw-r--r-- | MdePkg/Library/PeiMemoryAllocationLib/MemoryAllocationLib.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/MdePkg/Library/PeiMemoryAllocationLib/MemoryAllocationLib.c b/MdePkg/Library/PeiMemoryAllocationLib/MemoryAllocationLib.c index 274287cf03..59e9a26238 100644 --- a/MdePkg/Library/PeiMemoryAllocationLib/MemoryAllocationLib.c +++ b/MdePkg/Library/PeiMemoryAllocationLib/MemoryAllocationLib.c @@ -451,6 +451,9 @@ InternalAllocateCopyPool ( {
VOID *Memory;
+ ASSERT (Buffer != NULL);
+ ASSERT (AllocationSize <= (MAX_ADDRESS - (UINTN) Buffer + 1));
+
Memory = InternalAllocatePool (PoolType, AllocationSize);
if (Memory != NULL) {
Memory = CopyMem (Memory, Buffer, AllocationSize);
@@ -477,6 +480,9 @@ AllocateCopyPool ( {
VOID *Memory;
+ ASSERT (Buffer != NULL);
+ ASSERT (AllocationSize <= (MAX_ADDRESS - (UINTN) Buffer + 1));
+
Memory = AllocatePool (AllocationSize);
if (Memory != NULL) {
Memory = CopyMem (Memory, Buffer, AllocationSize);
@@ -791,6 +797,9 @@ InternalAllocateAlignedCopyPool ( {
VOID *Memory;
+ ASSERT (Buffer != NULL);
+ ASSERT (AllocationSize <= (MAX_ADDRESS - (UINTN) Buffer + 1));
+
Memory = InternalAllocateAlignedPool (PoolType, AllocationSize, Alignment);
if (Memory != NULL) {
Memory = CopyMem (Memory, Buffer, AllocationSize);
@@ -820,6 +829,9 @@ AllocateAlignedCopyPool ( {
VOID *Memory;
+ ASSERT (Buffer != NULL);
+ ASSERT (AllocationSize <= (MAX_ADDRESS - (UINTN) Buffer + 1));
+
Memory = AllocateAlignedPool (AllocationSize, Alignment);
if (Memory != NULL) {
Memory = CopyMem (Memory, Buffer, AllocationSize);
|