diff options
author | Star Zeng <star.zeng@intel.com> | 2016-06-15 13:38:03 +0800 |
---|---|---|
committer | Hao Wu <hao.a.wu@intel.com> | 2016-07-07 13:59:08 +0800 |
commit | d83399e08656dc8c951caf60b7043846cb9539cd (patch) | |
tree | 98749ef2299faad5729b576d4ab3da745413146e /NetworkPkg/Application/IpsecConfig | |
parent | e305e4d354d725ec62b1bafc6277170def7f8375 (diff) | |
download | edk2-platforms-d83399e08656dc8c951caf60b7043846cb9539cd.tar.xz |
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>
(cherry picked from commit b9679cd7458110573dd4614148433312b61a1e26)
Diffstat (limited to 'NetworkPkg/Application/IpsecConfig')
-rw-r--r-- | NetworkPkg/Application/IpsecConfig/PolicyEntryOperation.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/NetworkPkg/Application/IpsecConfig/PolicyEntryOperation.c b/NetworkPkg/Application/IpsecConfig/PolicyEntryOperation.c index 970caa16ca..6af9a4a547 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;
|