summaryrefslogtreecommitdiff
path: root/IntelFspPkg
diff options
context:
space:
mode:
authorHao Wu <hao.a.wu@intel.com>2015-06-30 06:30:20 +0000
committerhwu1225 <hwu1225@Edk2>2015-06-30 06:30:20 +0000
commitc42b399a086638db9f5f2f0af0520fd5e6be5855 (patch)
treeaf75fc2f388fb881d8c7605675a36665c88381fb /IntelFspPkg
parentdf1e74f5a267fb6eb303b90bea7bdc766a9d4af9 (diff)
downloadedk2-platforms-c42b399a086638db9f5f2f0af0520fd5e6be5855.tar.xz
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
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);