]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4ConfigNv.c
MdeModulePkg: Replace unsafe string functions.
[mirror_edk2.git] / MdeModulePkg / Universal / Network / Ip4ConfigDxe / Ip4ConfigNv.c
index 89e1ddaf39063cb49df33f03993f80291bab6667..794bb799490219248da952202e11f3709d69f250 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Helper functions for configuring or getting the parameters relating to Ip4.\r
 \r
-Copyright (c) 2009 - 2012, 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
@@ -487,10 +487,10 @@ Ip4DeviceExtractConfig (
     *Results = AllocateZeroPool (Size * sizeof (CHAR16));\r
     ASSERT (*Results != NULL);\r
     StrPointer  = *Results;\r
-    StrCpy (StrPointer, DeviceResult);\r
+    StrCpyS (StrPointer, Size, DeviceResult);\r
     StrPointer  = StrPointer + StrLen (StrPointer);\r
     *StrPointer = L'&';\r
-    StrCpy (StrPointer + 1, FormResult);\r
+    StrCpyS (StrPointer + 1, StrLen (FormResult) + 1, FormResult);\r
     FreePool (DeviceResult);\r
     FreePool (FormResult);\r
   } else if (HiiIsConfigHdrMatch (Request, &gEfiNicIp4ConfigVariableGuid, EFI_NIC_IP4_CONFIG_VARIABLE)) {\r