diff options
Diffstat (limited to 'MdePkg/Library/BaseMemoryLibSse2/SetMemWrapper.c')
-rw-r--r-- | MdePkg/Library/BaseMemoryLibSse2/SetMemWrapper.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/MdePkg/Library/BaseMemoryLibSse2/SetMemWrapper.c b/MdePkg/Library/BaseMemoryLibSse2/SetMemWrapper.c index 294a27a753..0600dc289f 100644 --- a/MdePkg/Library/BaseMemoryLibSse2/SetMemWrapper.c +++ b/MdePkg/Library/BaseMemoryLibSse2/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);
}
|