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:
Qiu Shumin 2014-08-21 05:26:25 +00:00 committed by shenshushi
parent 709edd4444
commit acbd7f9f17
1 changed files with 1 additions and 0 deletions

View File

@ -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;