From 35e471dbb25e30d1628ab4f6ee450e062e5c733f Mon Sep 17 00:00:00 2001 From: Hao Wu Date: Tue, 30 Jun 2015 06:25:29 +0000 Subject: [PATCH] IntelFrameworkModulePkg IsaFloppyDxe: Use safe string functions Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu Reviewed-by: Jeff Fan Reviewed-by: Jaben Carsey git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17732 6f19259b-4bc3-4df7-8a09-765794883524 --- IntelFrameworkModulePkg/Bus/Isa/IsaFloppyDxe/ComponentName.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/IntelFrameworkModulePkg/Bus/Isa/IsaFloppyDxe/ComponentName.c b/IntelFrameworkModulePkg/Bus/Isa/IsaFloppyDxe/ComponentName.c index a41760ea42..f3341ed884 100644 --- a/IntelFrameworkModulePkg/Bus/Isa/IsaFloppyDxe/ComponentName.c +++ b/IntelFrameworkModulePkg/Bus/Isa/IsaFloppyDxe/ComponentName.c @@ -1,7 +1,7 @@ /** @file UEFI Component Name(2) protocol implementation for Isa Floppy driver. -Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -227,7 +227,7 @@ AddName ( CHAR16 FloppyDriveName[FLOPPY_DRIVE_NAME_LEN + 1]; if (!(FeaturePcdGet(PcdComponentNameDisable) && FeaturePcdGet(PcdComponentName2Disable))) { - StrCpy (FloppyDriveName, FLOPPY_DRIVE_NAME); + StrCpyS (FloppyDriveName, FLOPPY_DRIVE_NAME_LEN + 1, FLOPPY_DRIVE_NAME); FloppyDriveName[FLOPPY_DRIVE_NAME_LEN - 1] = (CHAR16) (L'0' + FdcDev->Disk); AddUnicodeString2 ( -- 2.39.2