summaryrefslogtreecommitdiff
path: root/IntelFspPkg
diff options
context:
space:
mode:
Diffstat (limited to 'IntelFspPkg')
-rw-r--r--IntelFspPkg/Library/BaseFspDebugLibSerialPort/DebugLib.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/IntelFspPkg/Library/BaseFspDebugLibSerialPort/DebugLib.c b/IntelFspPkg/Library/BaseFspDebugLibSerialPort/DebugLib.c
index 8d90a1a598..73bb08e357 100644
--- a/IntelFspPkg/Library/BaseFspDebugLibSerialPort/DebugLib.c
+++ b/IntelFspPkg/Library/BaseFspDebugLibSerialPort/DebugLib.c
@@ -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);