Revision: 17934
http://sourceforge.net/p/edk2/code/17934
Author: hwu1225
Date: 2015-07-13 01:24:24 +0000 (Mon, 13 Jul 2015)
Log Message:
-----------
UefiCpuPkg S3Resume2Pei: Fix ASSERT in WriteToOsS3PerformanceData
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 <[email protected]>
Reviewed-by: Qiu Shumin <[email protected]>
Reviewed-by: Jeff Fan <[email protected]>
Revision Links:
--------------
http://sourceforge.net/p/edk2/code/17744
Modified Paths:
--------------
trunk/edk2/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c
Modified: trunk/edk2/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c
===================================================================
--- trunk/edk2/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c
2015-07-13 01:24:00 UTC (rev 17933)
+++ trunk/edk2/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c
2015-07-13 01:24:24 UTC (rev 17934)
@@ -366,7 +366,7 @@
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;
------------------------------------------------------------------------------
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-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits