From 03e772c322f7364c4721e1bb4eb041ddb0d319e9 Mon Sep 17 00:00:00 2001 From: vanjeff Date: Sat, 8 Jul 2006 15:21:04 +0000 Subject: [PATCH] In AsciiStrncmp(), if length=0, should return 0 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@840 6f19259b-4bc3-4df7-8a09-765794883524 --- MdePkg/Library/BaseLib/String.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/MdePkg/Library/BaseLib/String.c b/MdePkg/Library/BaseLib/String.c index 80223c6732..a59a9d08cb 100644 --- a/MdePkg/Library/BaseLib/String.c +++ b/MdePkg/Library/BaseLib/String.c @@ -713,6 +713,10 @@ AsciiStrnCmp ( IN UINTN Length ) { + if (Length == 0) { + return 0; + } + // // ASSERT both strings are less long than PcdMaximumAsciiStringLength // -- 2.39.2