Update PeiDxeDebugDebugLibReportStatusCode to use CopyMem() in place of AsciiStrnCpy() to copy ASCII string to save size.

Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>




git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13441 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
lgao4 2012-06-12 02:16:16 +00:00
parent 93c0bdec28
commit 856d643816
1 changed files with 2 additions and 2 deletions

View File

@ -303,14 +303,14 @@ DebugAssert (
//
// Copy Ascii FileName including NULL terminator.
//
Temp = AsciiStrnCpy ((CHAR8 *)(AssertData + 1), FileName, FileNameSize);
Temp = CopyMem (AssertData + 1, FileName, FileNameSize);
Temp[FileNameSize - 1] = 0;
TotalSize += FileNameSize;
//
// Copy Ascii Description include NULL terminator.
//
Temp = AsciiStrnCpy (Temp + FileNameSize, Description, DescriptionSize);
Temp = CopyMem (Temp + FileNameSize, Description, DescriptionSize);
Temp[DescriptionSize - 1] = 0;
TotalSize += DescriptionSize;