]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/Application/IfConfig6/IfConfig6.c
Update network stack code to use StrnCpy instead of StrCpy.
[mirror_edk2.git] / NetworkPkg / Application / IfConfig6 / IfConfig6.c
index 36cc7499338ba5ba906d82775408ad3f44de7836..9e228ca7bc76b50e5af6ecb204f86e07f746fce3 100644 (file)
@@ -136,7 +136,7 @@ SplitStrToList (
   //\r
   Str     = (CHAR16 *) AllocateZeroPool (StrSize (String));\r
   ASSERT (Str != NULL);\r
-  Str     = StrCpy (Str, String);\r
+  Str     = StrnCpy (Str, String, StrLen (String));\r
   ArgStr  = Str;\r
 \r
   //\r
@@ -1720,7 +1720,7 @@ IfConfig6Initialize (
       Str             = (CHAR16 *) AllocateZeroPool (StrSize (ValueStr));\r
       ASSERT (Str != NULL);\r
 \r
-      Str             = StrCpy (Str, ValueStr);\r
+      Str             = StrnCpy (Str, ValueStr, StrLen (ValueStr));\r
       Private->IfName = Str;\r
     }\r
   }\r
@@ -1734,7 +1734,7 @@ IfConfig6Initialize (
       Str             = (CHAR16 *) AllocateZeroPool (StrSize (ValueStr));\r
       ASSERT (Str != NULL);\r
 \r
-      Str             = StrCpy (Str, ValueStr);\r
+      Str             = StrnCpy (Str, ValueStr, StrLen (ValueStr));\r
       Private->IfName = Str;\r
     }\r
   }\r