diff options
Diffstat (limited to 'MdePkg/Library/UefiMemoryLib/CopyMemWrapper.c')
-rw-r--r-- | MdePkg/Library/UefiMemoryLib/CopyMemWrapper.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/MdePkg/Library/UefiMemoryLib/CopyMemWrapper.c b/MdePkg/Library/UefiMemoryLib/CopyMemWrapper.c index 438abf4e86..dc48904766 100644 --- a/MdePkg/Library/UefiMemoryLib/CopyMemWrapper.c +++ b/MdePkg/Library/UefiMemoryLib/CopyMemWrapper.c @@ -47,11 +47,13 @@ CopyMem ( if (Length == 0) {
return DestinationBuffer;
}
+
ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)DestinationBuffer));
ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)SourceBuffer));
if (DestinationBuffer == SourceBuffer) {
return DestinationBuffer;
}
+
return InternalMemCopyMem (DestinationBuffer, SourceBuffer, Length);
}
|