]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/CompareMemWrapper.c
Sync all bug fixes between EDK1.04 and EDK1.06 into EdkCompatibilityPkg.
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Library / EdkIIGlueLib / Library / BaseMemoryLib / CompareMemWrapper.c
index 4caec5f371009413af7349f1adee3683481c0018..9562460e0f5af793c4433f9acd2365ce37f66643 100644 (file)
@@ -1,6 +1,6 @@
 /*++\r
 \r
-Copyright (c) 2004 - 2006, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials                          \r
 are licensed and made available under the terms and conditions of the BSD License         \r
 which accompanies this distribution.  The full text of the license may be found at        \r
@@ -51,7 +51,7 @@ GlueCompareMem (
   IN UINTN       Length\r
   )\r
 {\r
-  if (Length == 0) {\r
+  if (Length == 0 || DestinationBuffer == SourceBuffer) {\r
     return 0;\r
   }\r
   ASSERT (DestinationBuffer != NULL);\r