mirror of https://github.com/acidanthera/audk.git
MdeModulePkg: Use StrnCpyS instead of StrCpyS to indicate the copy length from the source.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qiu Shumin <shumin.qiu@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17841 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
c64816c652
commit
0ec2bfc857
|
@ -191,10 +191,10 @@ StartGaugeEx (
|
|||
GaugeEntryExArray[Index].Handle = (EFI_PHYSICAL_ADDRESS) (UINTN) Handle;
|
||||
|
||||
if (Token != NULL) {
|
||||
AsciiStrCpyS (GaugeEntryExArray[Index].Token, DXE_PERFORMANCE_STRING_SIZE, Token);
|
||||
AsciiStrnCpyS (GaugeEntryExArray[Index].Token, DXE_PERFORMANCE_STRING_SIZE, Token, DXE_PERFORMANCE_STRING_LENGTH);
|
||||
}
|
||||
if (Module != NULL) {
|
||||
AsciiStrCpyS (GaugeEntryExArray[Index].Module, DXE_PERFORMANCE_STRING_SIZE, Module);
|
||||
AsciiStrnCpyS (GaugeEntryExArray[Index].Module, DXE_PERFORMANCE_STRING_SIZE, Module, DXE_PERFORMANCE_STRING_LENGTH);
|
||||
}
|
||||
|
||||
GaugeEntryExArray[Index].EndTimeStamp = 0;
|
||||
|
|
|
@ -320,7 +320,7 @@ BmWriteBootToOsPerformanceData (
|
|||
|
||||
ZeroMem (&mBmPerfData, sizeof (PERF_DATA));
|
||||
|
||||
AsciiStrCpyS (mBmPerfData.Token, PERF_TOKEN_SIZE, Token);
|
||||
AsciiStrnCpyS (mBmPerfData.Token, PERF_TOKEN_SIZE, Token, PERF_TOKEN_LENGTH);
|
||||
if (StartTicker == 1) {
|
||||
StartTicker = StartValue;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue