summaryrefslogtreecommitdiffstats
path: root/NetworkPkg/Application
diff options
context:
space:
mode:
authorStar Zeng <star.zeng@intel.com>2016-06-15 13:38:03 +0800
committerStar Zeng <star.zeng@intel.com>2016-06-21 12:46:24 +0800
commitb9679cd7458110573dd4614148433312b61a1e26 (patch)
tree88423b27ce0fed9ba6e79168caeff6ad8f2ddbcd /NetworkPkg/Application
parentb68ccac17c7e6340ab7b3654ea51c86ad6b4201d (diff)
downloadedk2-b9679cd7458110573dd4614148433312b61a1e26.tar.gz
edk2-b9679cd7458110573dd4614148433312b61a1e26.tar.bz2
edk2-b9679cd7458110573dd4614148433312b61a1e26.zip
NetworkPkg: Replace UnicodeStrToAsciiStr/AsciiStrToUnicodeStr
It is the follow up of 3ab41b7a325ca11a12b42f5ad1661c4b6791cb49 to replace UnicodeStrToAsciiStr/AsciiStrToUnicodeStr with UnicodeStrToAsciiStrS/AsciiStrToUnicodeStrS. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Siyuan Fu <siyuan.fu@intel.com> Cc: Jiaxin Wu <jiaxin.wu@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: Jiaxin Wu <jiaxin.wu@intel.com> Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
Diffstat (limited to 'NetworkPkg/Application')
-rw-r--r--NetworkPkg/Application/IpsecConfig/PolicyEntryOperation.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/NetworkPkg/Application/IpsecConfig/PolicyEntryOperation.c b/NetworkPkg/Application/IpsecConfig/PolicyEntryOperation.c
index 9bbc11490c..06eb30c091 100644
--- a/NetworkPkg/Application/IpsecConfig/PolicyEntryOperation.c
+++ b/NetworkPkg/Application/IpsecConfig/PolicyEntryOperation.c
@@ -271,7 +271,7 @@ CreateSpdEntry (
//
ValueStr = ShellCommandLineGetValue (ParamPackage, L"--name");
if (ValueStr != NULL) {
- UnicodeStrToAsciiStr (ValueStr, (CHAR8 *) (*Data)->Name);
+ UnicodeStrToAsciiStrS (ValueStr, (CHAR8 *) (*Data)->Name, sizeof ((*Data)->Name));
*Mask |= NAME;
}
@@ -785,7 +785,7 @@ CreateSadEntry (
(*Data)->AlgoInfo.EspAlgoInfo.EncKeyLength = EncKeyLength;
AsciiStr = AllocateZeroPool (EncKeyLength + 1);
ASSERT (AsciiStr != NULL);
- UnicodeStrToAsciiStr (ValueStr, AsciiStr);
+ UnicodeStrToAsciiStrS (ValueStr, AsciiStr, EncKeyLength + 1);
CopyMem ((*Data)->AlgoInfo.EspAlgoInfo.EncKey, AsciiStr, EncKeyLength);
FreePool (AsciiStr);
*Mask |= ENCRYPT_KEY;
@@ -815,7 +815,7 @@ CreateSadEntry (
(*Data)->AlgoInfo.EspAlgoInfo.AuthKeyLength = AuthKeyLength;
AsciiStr = AllocateZeroPool (AuthKeyLength + 1);
ASSERT (AsciiStr != NULL);
- UnicodeStrToAsciiStr (ValueStr, AsciiStr);
+ UnicodeStrToAsciiStrS (ValueStr, AsciiStr, AuthKeyLength + 1);
CopyMem ((*Data)->AlgoInfo.EspAlgoInfo.AuthKey, AsciiStr, AuthKeyLength);
FreePool (AsciiStr);
*Mask |= AUTH_KEY;