]> git.proxmox.com Git - mirror_edk2.git/commitdiff
This patch replaces StrCpy with StrnCpy or refactors out the usage of StrCpy through...
authorJaben Carsey <jaben.carsey@intel.com>
Fri, 29 Aug 2014 21:17:03 +0000 (21:17 +0000)
committerjcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 29 Aug 2014 21:17:03 +0000 (21:17 +0000)
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

ShellPkg/Library/UefiDpLib/DpUtilities.c

index f7e17c252cd09c031b3482d57ffa47f787b549c4..ef204ffef156eb2ac0abe437a950459ebe95e3e9 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Utility functions used by the Dp application.\r
 \r
-  Copyright (c) 2009 - 2013, Intel Corporation. All rights reserved.\r
+  Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.\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
@@ -144,7 +144,7 @@ GetShortPdbFileName (
   ZeroMem (UnicodeBuffer, DXE_PERFORMANCE_STRING_LENGTH * sizeof (CHAR16));\r
 \r
   if (PdbFileName == NULL) {\r
-    StrCpy (UnicodeBuffer, L" ");\r
+    StrnCpy (UnicodeBuffer, L" ", 1);\r
   } else {\r
     StartIndex = 0;\r
     for (EndIndex = 0; PdbFileName[EndIndex] != 0; EndIndex++)\r
@@ -334,7 +334,7 @@ GetNameFromHandle (
   //\r
   StringPtr = HiiGetString (gDpHiiHandle, STRING_TOKEN (STR_DP_ERROR_NAME), NULL);\r
   ASSERT (StringPtr != NULL);\r
-  StrCpy (mGaugeString, StringPtr);\r
+  StrnCpy (mGaugeString, StringPtr, DP_GAUGE_STRING_LENGTH);\r
   FreePool (StringPtr);\r
 }\r
 \r