This commit will resolve the issue brought by r17744. AsciiStrCpyS (PerfData->Token, PERF_TOKEN_SIZE, Token);
The above using of AsciiStrCpyS will cause ASSERT if Token is longer than PerfData->Token. Therefore, AsciiStrnCatS is used here to resolve the issue. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a...@intel.com> Reviewed-by: Qiu Shumin <shumin....@intel.com> Reviewed-by: Jeff Fan <jeff....@intel.com> --- UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c b/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c index d9d4ecb..a79fc59 100644 --- a/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c +++ b/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c @@ -366,7 +366,7 @@ WriteToOsS3PerformanceData ( if ((AsciiStrnCmp (Token, "PEIM", PEI_PERFORMANCE_STRING_SIZE) == 0) && (Handle != NULL)) { AsciiSPrint (PerfData->Token, PERF_TOKEN_LENGTH, "0x%11p", Handle); } else { - AsciiStrCpyS (PerfData->Token, PERF_TOKEN_SIZE, Token); + AsciiStrnCpyS (PerfData->Token, PERF_TOKEN_SIZE, Token, PERF_TOKEN_LENGTH); } if (StartTicker == 1) { StartTicker = StartValue; -- 1.9.5.msysgit.0 ------------------------------------------------------------------------------ Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel