IntelFspPkg BaseFspDebugLibSerialPort: Use safe string functions

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17743 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Hao Wu 2015-06-30 06:30:20 +00:00 committed by hwu1225
parent df1e74f5a2
commit c42b399a08
1 changed files with 6 additions and 1 deletions

View File

@ -148,7 +148,12 @@ DebugAssertInternal (
//
// Generate the ASSERT() message in Ascii format
//
AsciiStrnCpy (Buffer, "-> EBP:0x00000000 EIP:0x00000000\n", sizeof(Buffer));
AsciiStrnCpyS (
Buffer,
sizeof(Buffer) / sizeof(CHAR8),
"-> EBP:0x00000000 EIP:0x00000000\n",
sizeof(Buffer) / sizeof(CHAR8) - 1
);
SerialPortWrite ((UINT8 *)"ASSERT DUMP:\n", 13);
while (Frame != NULL) {
FillHex ((UINT32)Frame, Buffer + 9);