MdeModulePkg/Library/PeiPerformanceLib: Use safe string functions to refine code.

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
This commit is contained in:
Qiu Shumin 2015-07-01 08:15:27 +00:00 committed by shenshushi
parent 8f770819a1
commit e1565962dc
1 changed files with 3 additions and 3 deletions

View File

@ -6,7 +6,7 @@
performance data to the GUIDed HOB. Due to the limitation of temporary RAM, the maximum performance data to the GUIDed HOB. Due to the limitation of temporary RAM, the maximum
number of performance logging entry is specified by PcdMaxPeiPerformanceLogEntries. number of performance logging entry is specified by PcdMaxPeiPerformanceLogEntries.
Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR> Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License 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 which accompanies this distribution. The full text of the license may be found at
@ -190,10 +190,10 @@ StartPerformanceMeasurementEx (
LogEntryArray[Index].Handle = (EFI_PHYSICAL_ADDRESS) (UINTN) Handle; LogEntryArray[Index].Handle = (EFI_PHYSICAL_ADDRESS) (UINTN) Handle;
if (Token != NULL) { if (Token != NULL) {
AsciiStrnCpy (LogEntryArray[Index].Token, Token, PEI_PERFORMANCE_STRING_LENGTH); AsciiStrCpyS (LogEntryArray[Index].Token, PEI_PERFORMANCE_STRING_SIZE, Token);
} }
if (Module != NULL) { if (Module != NULL) {
AsciiStrnCpy (LogEntryArray[Index].Module, Module, PEI_PERFORMANCE_STRING_LENGTH); AsciiStrCpyS (LogEntryArray[Index].Module, PEI_PERFORMANCE_STRING_SIZE, Module);
} }
LogEntryArray[Index].EndTimeStamp = 0; LogEntryArray[Index].EndTimeStamp = 0;