summaryrefslogtreecommitdiff
path: root/MdePkg/Library/UefiMemoryLib/ZeroMemWrapper.c
diff options
context:
space:
mode:
authorqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2006-05-29 04:43:26 +0000
committerqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2006-05-29 04:43:26 +0000
commit19b362e879de90ef07ba67cd4f8aa97122f625b0 (patch)
tree38bb96c893ef456bd3389a02ddd52aaff8300e5b /MdePkg/Library/UefiMemoryLib/ZeroMemWrapper.c
parent277872438cb6f52662ee093a1385a6a6556e7c53 (diff)
downloadedk2-platforms-19b362e879de90ef07ba67cd4f8aa97122f625b0.tar.xz
BaseMemoryLib: Add missing ASSERT()s for some interfaces.
BaseTimerLibLocalApic: Add missing EBC architecture support. Note that this instance is a dummy one since EBC does not support local APIC timer. IoLibDxeCpuIo: Add alignment checking & unsupported width checking by using ASSERT()s. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@311 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Library/UefiMemoryLib/ZeroMemWrapper.c')
-rw-r--r--MdePkg/Library/UefiMemoryLib/ZeroMemWrapper.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/MdePkg/Library/UefiMemoryLib/ZeroMemWrapper.c b/MdePkg/Library/UefiMemoryLib/ZeroMemWrapper.c
index d7d7919ba2..4a3d615ce5 100644
--- a/MdePkg/Library/UefiMemoryLib/ZeroMemWrapper.c
+++ b/MdePkg/Library/UefiMemoryLib/ZeroMemWrapper.c
@@ -43,9 +43,10 @@ VOID *
EFIAPI
ZeroMem (
IN VOID *Buffer,
- IN UINTN Size
+ IN UINTN Length
)
{
- ASSERT (Buffer != NULL);
- return InternalMemSetMem (Buffer, Size, 0);
+ ASSERT (!(Buffer == NULL && Length > 0));
+ ASSERT (Length <= (MAX_ADDRESS - (UINTN)Buffer + 1));
+ return InternalMemSetMem (Buffer, Length, 0);
}