]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/IScsiDxe/IScsiExtScsiPassThru.c
NetworkPkg:Replace unsafe string functions.
[mirror_edk2.git] / NetworkPkg / IScsiDxe / IScsiExtScsiPassThru.c
index c785853bd8f27583080c1a836256dfafcf2ad065..f9712449b5066ccf08d611d1852b0792924583eb 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   The implementation of EFI_EXT_SCSI_PASS_THRU_PROTOCOL.\r
 \r
-Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 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
@@ -273,7 +273,7 @@ IScsiExtScsiPassThruBuildDevicePath (
 \r
   CopyMem (&Node->Iscsi.Lun, ConfigNvData->BootLun, sizeof (UINT64));\r
   Node->Iscsi.TargetPortalGroupTag = Session->TargetPortalGroupTag;\r
-  AsciiStrCpy ((CHAR8 *) Node + sizeof (ISCSI_DEVICE_PATH), ConfigNvData->TargetName);\r
+  AsciiStrCpyS ((CHAR8 *) Node + sizeof (ISCSI_DEVICE_PATH), AsciiStrLen (ConfigNvData->TargetName) + 1, ConfigNvData->TargetName);\r
 \r
   *DevicePath = (EFI_DEVICE_PATH_PROTOCOL *) Node;\r
 \r