//\r
ValueStr = ShellCommandLineGetValue (ParamPackage, L"--name");\r
if (ValueStr != NULL) {\r
- UnicodeStrToAsciiStr (ValueStr, (CHAR8 *) (*Data)->Name);\r
+ UnicodeStrToAsciiStrS (ValueStr, (CHAR8 *) (*Data)->Name, sizeof ((*Data)->Name));\r
*Mask |= NAME;\r
}\r
\r
(*Data)->AlgoInfo.EspAlgoInfo.EncKeyLength = EncKeyLength;\r
AsciiStr = AllocateZeroPool (EncKeyLength + 1);\r
ASSERT (AsciiStr != NULL);\r
- UnicodeStrToAsciiStr (ValueStr, AsciiStr);\r
+ UnicodeStrToAsciiStrS (ValueStr, AsciiStr, EncKeyLength + 1);\r
CopyMem ((*Data)->AlgoInfo.EspAlgoInfo.EncKey, AsciiStr, EncKeyLength);\r
FreePool (AsciiStr);\r
*Mask |= ENCRYPT_KEY;\r
(*Data)->AlgoInfo.EspAlgoInfo.AuthKeyLength = AuthKeyLength;\r
AsciiStr = AllocateZeroPool (AuthKeyLength + 1);\r
ASSERT (AsciiStr != NULL);\r
- UnicodeStrToAsciiStr (ValueStr, AsciiStr);\r
+ UnicodeStrToAsciiStrS (ValueStr, AsciiStr, AuthKeyLength + 1);\r
CopyMem ((*Data)->AlgoInfo.EspAlgoInfo.AuthKey, AsciiStr, AuthKeyLength);\r
FreePool (AsciiStr);\r
*Mask |= AUTH_KEY;\r