From acbd7f9f1738561520c3ee78d683e0164ecf5764 Mon Sep 17 00:00:00 2001 From: Qiu Shumin Date: Thu, 21 Aug 2014 05:26:25 +0000 Subject: 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 Reviewed-by: Tian Feng git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15862 6f19259b-4bc3-4df7-8a09-765794883524 --- UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c | 1 + 1 file changed, 1 insertion(+) (limited to 'UefiCpuPkg') 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; -- cgit v1.2.3