/*++\r
\r
-Copyright (c) 2005 - 2007, Intel Corporation\r
-All rights reserved. This program and the accompanying materials are licensed and made available\r
+Copyright (c) 2005 - 2015, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
distribution. The full text of the license may be found at\r
http://opensource.org/licenses/bsd-license.php\r
\r
--*/\r
{\r
- CHAR16 Buffer[FAT_MAIN_NAME_LEN + 1];\r
+ CHAR16 Buffer[FAT_MAIN_NAME_LEN + 1 + FAT_EXTEND_NAME_LEN + 1];\r
UINT8 OutCaseFlag;\r
\r
- ASSERT (StrSize (Str) <= sizeof (Buffer));\r
//\r
// Assume the case of input string is mixed\r
//\r
// Lower case a copy of the string, if it matches the\r
// original then the string is lower case\r
//\r
- StrCpy (Buffer, Str);\r
+ StrCpyS (Buffer, sizeof (Buffer) / sizeof (Buffer[0]), Str);\r
FatStrLwr (Buffer);\r
if (StrCmp (Str, Buffer) == 0) {\r
OutCaseFlag = InCaseFlag;\r
// Upper case a copy of the string, if it matches the\r
// original then the string is upper case\r
//\r
- StrCpy (Buffer, Str);\r
+ StrCpyS (Buffer, sizeof (Buffer) / sizeof (Buffer[0]), Str);\r
FatStrUpr (Buffer);\r
if (StrCmp (Str, Buffer) == 0) {\r
OutCaseFlag = 0;\r
\r
VOID\r
FatGetFileNameViaCaseFlag (\r
- IN FAT_DIRENT *DirEnt,\r
- OUT CHAR16 *FileString\r
+ IN FAT_DIRENT *DirEnt,\r
+ IN OUT CHAR16 *FileString,\r
+ IN UINTN FileStringMax\r
)\r
/*++\r
\r
FatNameToStr (File8Dot3Name + FAT_MAIN_NAME_LEN, FAT_EXTEND_NAME_LEN, CaseFlag & FAT_CASE_EXT_LOWER, &TempExt[1]);\r
if (TempExt[1] != 0) {\r
TempExt[0] = L'.';\r
- StrCat (FileString, TempExt);\r
+ StrCatS (FileString, FileStringMax, TempExt);\r
}\r
}\r
\r