diff options
author | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-07-08 15:21:04 +0000 |
---|---|---|
committer | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-07-08 15:21:04 +0000 |
commit | 03e772c322f7364c4721e1bb4eb041ddb0d319e9 (patch) | |
tree | 1a4a559780d304d996a963210be7f7ff3f7cefbb /MdePkg/Library | |
parent | bc724e5885e7f2bfe5f4883ed9e1dc7e02874c9b (diff) | |
download | edk2-platforms-03e772c322f7364c4721e1bb4eb041ddb0d319e9.tar.xz |
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
Diffstat (limited to 'MdePkg/Library')
-rw-r--r-- | MdePkg/Library/BaseLib/String.c | 4 |
1 files changed, 4 insertions, 0 deletions
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
//
|