]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode: Use safe string functions to...
authorQiu Shumin <shumin.qiu@intel.com>
Wed, 1 Jul 2015 08:14:36 +0000 (08:14 +0000)
committershenshushi <shenshushi@Edk2>
Wed, 1 Jul 2015 08:14:36 +0000 (08:14 +0000)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17779 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/DebugLib.c

index 68c1a5570b9e59dddc8baa69060e0b8c4e9b6c42..f1d98277a331e8ff76a6e1b920e5f92ddf82f04c 100644 (file)
@@ -115,7 +115,7 @@ DebugPrint (
   //\r
   // Copy the Format string into the record\r
   //\r
-  AsciiStrCpy (FormatString, Format);\r
+  AsciiStrCpyS (FormatString, sizeof(Buffer) - (4 + sizeof(EFI_DEBUG_INFO) + 12 * sizeof(UINT64)), Format);\r
 \r
   //\r
   // The first 12 * sizeof (UINT64) bytes following EFI_DEBUG_INFO are for variable arguments\r