]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/Dhcp6Dxe/ComponentName.c
Update network stack code to use StrnCpy instead of StrCpy.
[mirror_edk2.git] / NetworkPkg / Dhcp6Dxe / ComponentName.c
index 352df087f91b11afd0e881b783de6cf8555467dc..c7fd6075df92121eabe7481efdf37c83e8df74a6 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   UEFI Component Name(2) protocol implementation for Dhcp6 driver.\r
 \r
-  Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -281,7 +281,7 @@ UpdateName (
   if (Dhcp6ModeData.Ia == NULL) {\r
     UnicodeSPrint (HandleName, sizeof (HandleName), L"DHCPv6 (No configured IA)");\r
   } else {\r
-    StrCpy (HandleName, mDhcp6ControllerName[Dhcp6ModeData.Ia->State]);\r
+    StrnCpy (HandleName, mDhcp6ControllerName[Dhcp6ModeData.Ia->State], sizeof (HandleName) / sizeof (CHAR16) - 1);\r
   }\r
   \r
   Status = AddUnicodeString2 (\r