]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFrameworkModulePkg/Bus/Isa/IsaFloppyDxe/ComponentName.c
IntelFrameworkModulePkg IsaFloppyDxe: Use safe string functions
[mirror_edk2.git] / IntelFrameworkModulePkg / Bus / Isa / IsaFloppyDxe / ComponentName.c
index a41760ea4271747262027aabc94496464efc26f4..f3341ed88407b6e4069fa1d7367fb4298e549d67 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   UEFI Component Name(2) protocol implementation for Isa Floppy driver.\r
 \r
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 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
@@ -227,7 +227,7 @@ AddName (
   CHAR16  FloppyDriveName[FLOPPY_DRIVE_NAME_LEN + 1];\r
 \r
   if (!(FeaturePcdGet(PcdComponentNameDisable) && FeaturePcdGet(PcdComponentName2Disable))) {\r
-    StrCpy (FloppyDriveName, FLOPPY_DRIVE_NAME);\r
+    StrCpyS (FloppyDriveName, FLOPPY_DRIVE_NAME_LEN + 1, FLOPPY_DRIVE_NAME);\r
     FloppyDriveName[FLOPPY_DRIVE_NAME_LEN - 1] = (CHAR16) (L'0' + FdcDev->Disk);\r
 \r
     AddUnicodeString2 (\r