diff options
author | Ruiyu Ni <ruiyu.ni@intel.com> | 2018-03-01 14:33:43 +0800 |
---|---|---|
committer | Ruiyu Ni <ruiyu.ni@intel.com> | 2018-03-02 13:41:33 +0800 |
commit | a7119c81528072b13e9664ce51f70b8f91f4d9e2 (patch) | |
tree | feece9163c81cf6cd964101c4544a6099965b1c6 /MdeModulePkg | |
parent | 79f84eb676982fd35e6089060f247c5e38d691dd (diff) | |
download | edk2-a7119c81528072b13e9664ce51f70b8f91f4d9e2.zip edk2-a7119c81528072b13e9664ce51f70b8f91f4d9e2.tar.gz edk2-a7119c81528072b13e9664ce51f70b8f91f4d9e2.tar.bz2 |
MdeModulePkg/DebugLibReportStatusCode: Fix hang if format is too long
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>
Diffstat (limited to 'MdeModulePkg')
-rw-r--r-- | MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/DebugLib.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/DebugLib.c b/MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/DebugLib.c index 16a1d20..96c9b30 100644 --- a/MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/DebugLib.c +++ b/MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/DebugLib.c @@ -126,6 +126,11 @@ DebugPrint ( // Here we will process the variable arguments and pack them in this area.
//
VA_START (VaListMarker, Format);
+
+ //
+ // Use the actual format string.
+ //
+ Format = FormatString;
for (; *Format != '\0'; Format++) {
//
// Only format with prefix % is processed.
|