summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStar Zeng <star.zeng@intel.com>2016-06-15 13:05:00 +0800
committerHao Wu <hao.a.wu@intel.com>2016-07-07 13:09:29 +0800
commitd31fc34c04b77f785f73c14cd632ea033f0c9dfa (patch)
tree05be89ad56a9888236b3cd6589ed1924e9268afc
parentfe4072c0d41a9883a22fca32ba677d0b4313019c (diff)
downloadedk2-platforms-d31fc34c04b77f785f73c14cd632ea033f0c9dfa.tar.xz
MdePkg: Replace UnicodeStrToAsciiStr() with UnicodeStrToAsciiStrS()
It is the follow up of 3ab41b7a325ca11a12b42f5ad1661c4b6791cb49 to replace UnicodeStrToAsciiStr/AsciiStrToUnicodeStr with UnicodeStrToAsciiStrS/AsciiStrToUnicodeStrS. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> (cherry picked from commit ca2ac9d521b595e969dbe65f1a19fd96d499fa61)
-rw-r--r--MdePkg/Library/UefiDevicePathLib/DevicePathFromText.c4
-rw-r--r--MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/MdePkg/Library/UefiDevicePathLib/DevicePathFromText.c b/MdePkg/Library/UefiDevicePathLib/DevicePathFromText.c
index 6a9b389ca5..0ee7b694d6 100644
--- a/MdePkg/Library/UefiDevicePathLib/DevicePathFromText.c
+++ b/MdePkg/Library/UefiDevicePathLib/DevicePathFromText.c
@@ -1,7 +1,7 @@
/** @file
DevicePathFromText protocol as defined in the UEFI 2.0 specification.
-Copyright (c) 2013 - 2015, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2013 - 2016, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -2845,7 +2845,7 @@ DevPathFromTextWiFi (
DataLen = 32;
}
- UnicodeStrToAsciiStr (SSIdStr, AsciiStr);
+ UnicodeStrToAsciiStrS (SSIdStr, AsciiStr, sizeof (AsciiStr));
CopyMem (WiFiDp->SSId, AsciiStr, DataLen);
}
diff --git a/MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.c b/MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.c
index dfec5fa4d4..8f3cde0f6c 100644
--- a/MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.c
+++ b/MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.c
@@ -1,7 +1,7 @@
/** @file
Provides interface to EFI_FILE_HANDLE functionality.
- Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved. <BR>
+ Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved. <BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -1136,7 +1136,7 @@ FileHandleWriteLine(
if (AsciiBuffer == NULL) {
return EFI_OUT_OF_RESOURCES;
}
- UnicodeStrToAsciiStr (Buffer, AsciiBuffer);
+ UnicodeStrToAsciiStrS (Buffer, AsciiBuffer, Size);
for (Index = 0; Index < Size; Index++) {
if (!((AsciiBuffer[Index] >= 0) && (AsciiBuffer[Index] < 128))){
FreePool(AsciiBuffer);