diff options
author | yshang1 <yshang1@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-06-15 02:54:27 +0000 |
---|---|---|
committer | yshang1 <yshang1@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-06-15 02:54:27 +0000 |
commit | 1ee3e26b9474444603a36fc740702c80927ca8d1 (patch) | |
tree | f53a8e37a4c65c0105f6e341ca11692d13a367d4 /MdePkg/Library/UefiMemoryLib | |
parent | 508daae71b4c754321cb28e1fe7671a2ec1374f7 (diff) | |
download | edk2-1ee3e26b9474444603a36fc740702c80927ca8d1.tar.gz edk2-1ee3e26b9474444603a36fc740702c80927ca8d1.tar.bz2 edk2-1ee3e26b9474444603a36fc740702c80927ca8d1.zip |
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@520 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Library/UefiMemoryLib')
-rw-r--r-- | MdePkg/Library/UefiMemoryLib/SetMemWrapper.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/MdePkg/Library/UefiMemoryLib/SetMemWrapper.c b/MdePkg/Library/UefiMemoryLib/SetMemWrapper.c index 294a27a753..0600dc289f 100644 --- a/MdePkg/Library/UefiMemoryLib/SetMemWrapper.c +++ b/MdePkg/Library/UefiMemoryLib/SetMemWrapper.c @@ -47,6 +47,9 @@ SetMem ( IN UINT8 Value
)
{
- ASSERT (Size <= MAX_ADDRESS - (UINTN)Buffer + 1);
+ if (Size == 0) {
+ return Buffer;
+ }
+ ASSERT (Size - 1 <= MAX_ADDRESS - (UINTN)Buffer);
return InternalMemSetMem (Buffer, Size, Value);
}
|