MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/DebugLib.c | 5 +++++ 1 file changed, 5 insertions(+)
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>
Cc: Liming Gao <liming.gao@intel.com>
---
MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/DebugLib.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/DebugLib.c b/MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/DebugLib.c
index 16a1d206fb..96c9b30987 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.
--
2.16.1.windows.1
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Reviewed-by: Liming Gao <liming.gao@intel.com> > -----Original Message----- > From: Ni, Ruiyu > Sent: Thursday, March 1, 2018 2:34 PM > To: edk2-devel@lists.01.org > Cc: Gao, Liming <liming.gao@intel.com> > Subject: [PATCH] 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> > Cc: Liming Gao <liming.gao@intel.com> > --- > MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/DebugLib.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/DebugLib.c > b/MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/DebugLib.c > index 16a1d206fb..96c9b30987 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. > -- > 2.16.1.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
© 2016 - 2024 Red Hat, Inc.