]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.c
MdeModulePkg: Refine code to use Strn**S safe functions instead of Str**S ones in...
[mirror_edk2.git] / MdeModulePkg / Library / PeiPerformanceLib / PeiPerformanceLib.c
index 60451eefdf34ea83a5c8b43fea95f1a064e4f2ad..0b5a717caa01890f8e64aea12675f24894fefa21 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
+    AsciiStrnCpyS (LogEntryArray[Index].Token, PEI_PERFORMANCE_STRING_SIZE, Token, PEI_PERFORMANCE_STRING_LENGTH);\r
   }\r
   if (Module != NULL) {\r
-    AsciiStrnCpy (LogEntryArray[Index].Module, Module, PEI_PERFORMANCE_STRING_LENGTH);\r
+    AsciiStrnCpyS (LogEntryArray[Index].Module, PEI_PERFORMANCE_STRING_SIZE, Module, PEI_PERFORMANCE_STRING_LENGTH);\r
   }\r
 \r
   LogEntryArray[Index].EndTimeStamp = 0;\r