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/BaseMemoryLibRepStr | |
parent | 508daae71b4c754321cb28e1fe7671a2ec1374f7 (diff) | |
download | edk2-1ee3e26b9474444603a36fc740702c80927ca8d1.zip edk2-1ee3e26b9474444603a36fc740702c80927ca8d1.tar.gz edk2-1ee3e26b9474444603a36fc740702c80927ca8d1.tar.bz2 |
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@520 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Library/BaseMemoryLibRepStr')
-rw-r--r-- | MdePkg/Library/BaseMemoryLibRepStr/SetMemWrapper.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/MdePkg/Library/BaseMemoryLibRepStr/SetMemWrapper.c b/MdePkg/Library/BaseMemoryLibRepStr/SetMemWrapper.c index 294a27a..0600dc2 100644 --- a/MdePkg/Library/BaseMemoryLibRepStr/SetMemWrapper.c +++ b/MdePkg/Library/BaseMemoryLibRepStr/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);
}
|