]> git.proxmox.com Git - mirror_edk2.git/blobdiff - SecurityPkg/UserIdentification/UserProfileManagerDxe/UserProfileModify.c
SecurityPkg:Replace unsafe string functions.
[mirror_edk2.git] / SecurityPkg / UserIdentification / UserProfileManagerDxe / UserProfileModify.c
index a0eb4afa9edbed4677602d79cc8c53facb03e655..833307189a63d97d8e42686326812b632d6fa332 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   The functions to modify a user profile.\r
     \r
-Copyright (c) 2009 - 2011, 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
@@ -345,11 +345,11 @@ AddStr (
   ASSERT (TmpStr != NULL);\r
 \r
   if (*Source1 == NULL) {\r
-    StrCpy (TmpStr, Source2);;\r
+    StrCpyS (TmpStr, StrLength / sizeof (CHAR16), Source2);\r
   } else {\r
-    StrCpy (TmpStr, *Source1);\r
+    StrCpyS (TmpStr, StrLength / sizeof (CHAR16), *Source1);\r
     FreePool (*Source1);\r
-    StrCat (TmpStr, Source2);\r
+    StrCatS (TmpStr, StrLength / sizeof (CHAR16),Source2);\r
   }\r
 \r
   *Source1 = TmpStr;\r