]> git.proxmox.com Git - mirror_edk2.git/blobdiff - SecurityPkg/UserIdentification/UserProfileManagerDxe/UserProfileModify.c
SecurityPkg: Convert all .uni files to utf-8
[mirror_edk2.git] / SecurityPkg / UserIdentification / UserProfileManagerDxe / UserProfileModify.c
index 67fc300f7257724e3273ad57e4f7d2ddfbd7aad1..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
@@ -338,18 +338,18 @@ AddStr (
     StrLength = StrSize (Source2);\r
   } else {\r
     StrLength  = StrSize (*Source1);\r
-    StrLength += StrSize (Source2) -1;\r
+    StrLength += StrSize (Source2) - 2;\r
   }\r
 \r
   TmpStr     = AllocateZeroPool (StrLength);\r
   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