summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaben Carsey <jaben.carsey@intel.com>2014-08-29 21:17:03 +0000
committerjcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524>2014-08-29 21:17:03 +0000
commite87b40b2c71bcc943a1f9a186dc725789eeaf733 (patch)
tree1dc42c05371cd67b4771a956634b4e37ca0bf1c8
parent28b27e1850f07c41d2129dc25ceb2c3c1f2959a1 (diff)
downloadedk2-platforms-e87b40b2c71bcc943a1f9a186dc725789eeaf733.tar.xz
This patch replaces StrCpy with StrnCpy or refactors out the usage of StrCpy through some other means.
This patch replaces StrCat with StrnCat or refactors out the usage of StrCat through some other means. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16001 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--ShellPkg/Library/UefiDpLib/DpUtilities.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ShellPkg/Library/UefiDpLib/DpUtilities.c b/ShellPkg/Library/UefiDpLib/DpUtilities.c
index f7e17c252c..ef204ffef1 100644
--- a/ShellPkg/Library/UefiDpLib/DpUtilities.c
+++ b/ShellPkg/Library/UefiDpLib/DpUtilities.c
@@ -1,7 +1,7 @@
/** @file
Utility functions used by the Dp application.
- Copyright (c) 2009 - 2013, Intel Corporation. All rights reserved.
+ Copyright (c) 2009 - 2014, 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
@@ -144,7 +144,7 @@ GetShortPdbFileName (
ZeroMem (UnicodeBuffer, DXE_PERFORMANCE_STRING_LENGTH * sizeof (CHAR16));
if (PdbFileName == NULL) {
- StrCpy (UnicodeBuffer, L" ");
+ StrnCpy (UnicodeBuffer, L" ", 1);
} else {
StartIndex = 0;
for (EndIndex = 0; PdbFileName[EndIndex] != 0; EndIndex++)
@@ -334,7 +334,7 @@ GetNameFromHandle (
//
StringPtr = HiiGetString (gDpHiiHandle, STRING_TOKEN (STR_DP_ERROR_NAME), NULL);
ASSERT (StringPtr != NULL);
- StrCpy (mGaugeString, StringPtr);
+ StrnCpy (mGaugeString, StringPtr, DP_GAUGE_STRING_LENGTH);
FreePool (StringPtr);
}