Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qiu Shumin <shumin....@intel.com> Reviewed-by: Star Zeng <star.z...@intel.com> --- MdeModulePkg/Application/MemoryProfileInfo/MemoryProfileInfo.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/MdeModulePkg/Application/MemoryProfileInfo/MemoryProfileInfo.c b/MdeModulePkg/Application/MemoryProfileInfo/MemoryProfileInfo.c index 6304b7f..b425af1 100644 --- a/MdeModulePkg/Application/MemoryProfileInfo/MemoryProfileInfo.c +++ b/MdeModulePkg/Application/MemoryProfileInfo/MemoryProfileInfo.c @@ -121,10 +121,10 @@ GetShortPdbFileName ( UINTN StartIndex; UINTN EndIndex; - ZeroMem (UnicodeBuffer, PROFILE_NAME_STRING_LENGTH * sizeof (CHAR16)); + ZeroMem (UnicodeBuffer, (PROFILE_NAME_STRING_LENGTH + 1) * sizeof (CHAR16)); if (PdbFileName == NULL) { - StrnCpy (UnicodeBuffer, L" ", 1); + StrnCpyS (UnicodeBuffer, PROFILE_NAME_STRING_LENGTH + 1, L" ", 1); } else { StartIndex = 0; for (EndIndex = 0; PdbFileName[EndIndex] != 0; EndIndex++); @@ -201,7 +201,7 @@ GetDriverNameString ( // // Method 2: Get the name string from FFS UI section // - StrnCpy (mNameString, NameString, PROFILE_NAME_STRING_LENGTH); + StrCpyS (mNameString, PROFILE_NAME_STRING_LENGTH + 1, NameString); mNameString[PROFILE_NAME_STRING_LENGTH] = 0; FreePool (NameString); return; -- 1.9.5.msysgit.1 ------------------------------------------------------------------------------ Monitor 25 network devices or servers for free with OpManager! OpManager is web-based network management software that monitors network devices and physical & virtual servers, alerts via email & sms for fault. Monitor 25 devices for free with no restriction. Download now http://ad.doubleclick.net/ddm/clk/292181274;119417398;o _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel