diff options
Diffstat (limited to 'MdePkg/Library/UefiMemoryLib/ZeroMemWrapper.c')
-rw-r--r-- | MdePkg/Library/UefiMemoryLib/ZeroMemWrapper.c | 7 |
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);
}
|