/** @file\r
Utility functions used by the Dp application.\r
\r
- Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
ZeroMem (UnicodeBuffer, DXE_PERFORMANCE_STRING_LENGTH * sizeof (CHAR16));\r
\r
if (PdbFileName == NULL) {\r
- StrCpy (UnicodeBuffer, L" ");\r
+ StrCpyS (UnicodeBuffer, DXE_PERFORMANCE_STRING_SIZE, L" ");\r
} else {\r
StartIndex = 0;\r
for (EndIndex = 0; PdbFileName[EndIndex] != 0; EndIndex++)\r
);\r
SafeFreePool (BestLanguage);\r
if (!EFI_ERROR (Status)) {\r
- StrnCpy (mGaugeString, StringPtr, DP_GAUGE_STRING_LENGTH);\r
- mGaugeString[DP_GAUGE_STRING_LENGTH] = 0;\r
+ StrCpyS (\r
+ mGaugeString,\r
+ DP_GAUGE_STRING_LENGTH + 1,\r
+ StringPtr\r
+ );\r
return;\r
}\r
}\r
//\r
// Method 3. Get the name string from FFS UI section\r
//\r
- StrnCpy (mGaugeString, NameString, DP_GAUGE_STRING_LENGTH);\r
- mGaugeString[DP_GAUGE_STRING_LENGTH] = 0;\r
+ StrCpyS (\r
+ mGaugeString,\r
+ DP_GAUGE_STRING_LENGTH + 1,\r
+ NameString\r
+ );\r
FreePool (NameString);\r
} else {\r
//\r
//\r
NameString = ConvertDevicePathToText (LoadedImageDevicePath, TRUE, FALSE);\r
if (NameString != NULL) {\r
- StrnCpy (mGaugeString, NameString, DP_GAUGE_STRING_LENGTH);\r
- mGaugeString[DP_GAUGE_STRING_LENGTH] = 0;\r
+ StrCpyS (\r
+ mGaugeString,\r
+ DP_GAUGE_STRING_LENGTH + 1,\r
+ NameString\r
+ );\r
FreePool (NameString);\r
return;\r
}\r
//\r
StringPtr = HiiGetString (gHiiHandle, STRING_TOKEN (STR_DP_ERROR_NAME), NULL);\r
ASSERT (StringPtr != NULL);\r
- StrCpy (mGaugeString, StringPtr);\r
+ StrCpyS (mGaugeString, DP_GAUGE_STRING_LENGTH + 1, StringPtr);\r
FreePool (StringPtr);\r
return;\r
}\r