mirror of https://github.com/acidanthera/audk.git
Append the terminating null character at the end of the string to avoid buffer overflow.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qiu Shumin <shumin.qiu@intel.com> Reviewed-by: Tian Feng <feng.tian@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15862 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
709edd4444
commit
acbd7f9f17
|
@ -367,6 +367,7 @@ WriteToOsS3PerformanceData (
|
|||
AsciiSPrint (PerfData->Token, PERF_TOKEN_LENGTH, "0x%11p", Handle);
|
||||
} else {
|
||||
AsciiStrnCpy (PerfData->Token, Token, PERF_TOKEN_LENGTH);
|
||||
PerfData->Token[PERF_TOKEN_LENGTH] = '\0';
|
||||
}
|
||||
if (StartTicker == 1) {
|
||||
StartTicker = StartValue;
|
||||
|
|
Loading…
Reference in New Issue