Revision: 17841 http://sourceforge.net/p/edk2/code/17841 Author: shenshushi Date: 2015-07-07 03:01:07 +0000 (Tue, 07 Jul 2015) Log Message: ----------- MdeModulePkg: Use StrnCpyS instead of StrCpyS to indicate the copy length from the source.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qiu Shumin <shumin....@intel.com> Reviewed-by: Hao Wu <hao.a...@intel.com> Reviewed-by: Liming Gao <liming....@intel.com> Modified Paths: -------------- trunk/edk2/MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c trunk/edk2/MdeModulePkg/Library/UefiBootManagerLib/BmPerformance.c Modified: trunk/edk2/MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c =================================================================== --- trunk/edk2/MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c 2015-07-07 02:56:01 UTC (rev 17840) +++ trunk/edk2/MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c 2015-07-07 03:01:07 UTC (rev 17841) @@ -191,10 +191,10 @@ GaugeEntryExArray[Index].Handle = (EFI_PHYSICAL_ADDRESS) (UINTN) Handle; if (Token != NULL) { - AsciiStrCpyS (GaugeEntryExArray[Index].Token, DXE_PERFORMANCE_STRING_SIZE, Token); + AsciiStrnCpyS (GaugeEntryExArray[Index].Token, DXE_PERFORMANCE_STRING_SIZE, Token, DXE_PERFORMANCE_STRING_LENGTH); } if (Module != NULL) { - AsciiStrCpyS (GaugeEntryExArray[Index].Module, DXE_PERFORMANCE_STRING_SIZE, Module); + AsciiStrnCpyS (GaugeEntryExArray[Index].Module, DXE_PERFORMANCE_STRING_SIZE, Module, DXE_PERFORMANCE_STRING_LENGTH); } GaugeEntryExArray[Index].EndTimeStamp = 0; Modified: trunk/edk2/MdeModulePkg/Library/UefiBootManagerLib/BmPerformance.c =================================================================== --- trunk/edk2/MdeModulePkg/Library/UefiBootManagerLib/BmPerformance.c 2015-07-07 02:56:01 UTC (rev 17840) +++ trunk/edk2/MdeModulePkg/Library/UefiBootManagerLib/BmPerformance.c 2015-07-07 03:01:07 UTC (rev 17841) @@ -320,7 +320,7 @@ ZeroMem (&mBmPerfData, sizeof (PERF_DATA)); - AsciiStrCpyS (mBmPerfData.Token, PERF_TOKEN_SIZE, Token); + AsciiStrnCpyS (mBmPerfData.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 edk2-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-commits