]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg/DebugLibReportStatusCode: Fix hang if format is too long
authorRuiyu Ni <ruiyu.ni@intel.com>
Thu, 1 Mar 2018 06:33:43 +0000 (14:33 +0800)
committerRuiyu Ni <ruiyu.ni@intel.com>
Fri, 2 Mar 2018 05:41:33 +0000 (13:41 +0800)
The previous commit 137ed15511e2045a7333e33ae7f1e873ce1961dd
* MdeModulePkg/DebugLib: Print partial when format string is too long
copies partial format string to DEBUG_INFO buffer but when parsing
the format modifier, the original format string is still used.

The patch fixes this issue.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/DebugLib.c

index 16a1d206fb7f2d5936e02d572fc978d207e57f3b..96c9b30987298cabdf48025266cee63c54ab0b8d 100644 (file)
@@ -126,6 +126,11 @@ DebugPrint (
   // Here we will process the variable arguments and pack them in this area.\r
   //\r
   VA_START (VaListMarker, Format);\r
+\r
+  //\r
+  // Use the actual format string.\r
+  //\r
+  Format = FormatString;\r
   for (; *Format != '\0'; Format++) {\r
     //\r
     // Only format with prefix % is processed.\r