]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg/Library/PeiPerformanceLib: Use safe string functions to refine code.
authorQiu Shumin <shumin.qiu@intel.com>
Wed, 1 Jul 2015 08:15:27 +0000 (08:15 +0000)
committershenshushi <shenshushi@Edk2>
Wed, 1 Jul 2015 08:15:27 +0000 (08:15 +0000)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17780 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.c

index 60451eefdf34ea83a5c8b43fea95f1a064e4f2ad..4eb47d1386aa91fab2f5fbeac058dde7651fff94 100644 (file)
@@ -6,7 +6,7 @@
   performance data to the GUIDed HOB. Due to the limitation of temporary RAM, the maximum\r
   number of performance logging entry is specified by PcdMaxPeiPerformanceLogEntries.  \r
 \r
-Copyright (c) 2006 - 2012, 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
@@ -190,10 +190,10 @@ StartPerformanceMeasurementEx (
   LogEntryArray[Index].Handle = (EFI_PHYSICAL_ADDRESS) (UINTN) Handle;\r
 \r
   if (Token != NULL) {\r
-    AsciiStrnCpy (LogEntryArray[Index].Token, Token, PEI_PERFORMANCE_STRING_LENGTH);\r
+    AsciiStrCpyS (LogEntryArray[Index].Token, PEI_PERFORMANCE_STRING_SIZE, Token);\r
   }\r
   if (Module != NULL) {\r
-    AsciiStrnCpy (LogEntryArray[Index].Module, Module, PEI_PERFORMANCE_STRING_LENGTH);\r
+    AsciiStrCpyS (LogEntryArray[Index].Module, PEI_PERFORMANCE_STRING_SIZE, Module);\r
   }\r
 \r
   LogEntryArray[Index].EndTimeStamp = 0;\r