* [PATCH] MdeModulePkg/DebugLibReportStatusCode: Fix hang if format is too long
@ 2018-03-01 6:34 Ruiyu Ni
2018-03-02 2:57 ` Gao, Liming
0 siblings, 1 reply; 2+ messages in thread
From: Ruiyu Ni @ 2018-03-01 6:34 UTC (permalink / raw)
To: edk2-devel; +Cc: Liming Gao
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] MdeModulePkg/DebugLibReportStatusCode: Fix hang if format is too long
2018-03-01 6:34 [PATCH] MdeModulePkg/DebugLibReportStatusCode: Fix hang if format is too long Ruiyu Ni
@ 2018-03-02 2:57 ` Gao, Liming
0 siblings, 0 replies; 2+ messages in thread
From: Gao, Liming @ 2018-03-02 2:57 UTC (permalink / raw)
To: Ni, Ruiyu, edk2-devel@lists.01.org
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-03-02 2:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-01 6:34 [PATCH] MdeModulePkg/DebugLibReportStatusCode: Fix hang if format is too long Ruiyu Ni
2018-03-02 2:57 ` Gao, Liming
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox