diff options
author | Qiu Shumin <shumin.qiu@intel.com> | 2014-08-21 05:26:25 +0000 |
---|---|---|
committer | shenshushi <shenshushi@6f19259b-4bc3-4df7-8a09-765794883524> | 2014-08-21 05:26:25 +0000 |
commit | acbd7f9f1738561520c3ee78d683e0164ecf5764 (patch) | |
tree | 235669eb86a886e28ee6ff7d3a91c7cfd48734b9 /UefiCpuPkg | |
parent | 709edd4444384da6ed85d7fbead14d41b9f9f7f9 (diff) | |
download | edk2-acbd7f9f1738561520c3ee78d683e0164ecf5764.tar.gz edk2-acbd7f9f1738561520c3ee78d683e0164ecf5764.tar.bz2 edk2-acbd7f9f1738561520c3ee78d683e0164ecf5764.zip |
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
Diffstat (limited to 'UefiCpuPkg')
-rw-r--r-- | UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c b/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c index f5100fa9ad..7575dbfd0d 100644 --- a/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c +++ b/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c @@ -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;
|