diff options
| author | Ray Ni <ray.ni@intel.com> | 2026-02-14 10:46:34 +0300 |
|---|---|---|
| committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2026-02-27 06:30:57 +0300 |
| commit | 4d0946c082dfaf1556a2ecb0fd496d27acb8cecd (patch) | |
| tree | 43ab357ddd4b3c6b24141d87503c2545b9bc98e9 /MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode | |
| parent | a7c119589fe2c5829011e3bbe717285f2ff2ab28 (diff) | |
| download | edk2-4d0946c082dfaf1556a2ecb0fd496d27acb8cecd.tar.xz | |
MdeModulePkg/PeiDxeDebugLibReportStatusCode: Fix comma parsing
The DebugPrintMarker function in PeiDxeDebugLibReportStatusCode/DebugLib.c
does not recognize the comma (`,`) flag in printf-style format strings.
When a driver uses format strings with thousand separators like "%,ld" to
format large numbers (e.g., 1234567 as "1,234,567"), the DebugPrintMarker
parser fails to recognize the comma flag and causes incorrect argument
extraction when building the BASE_LIST for status code reporting, leading
to unexpected or corrupted debug output in status code reports.
The change is to add the missing comma flag check to align with
BasePrintLib's format parsing logic, ensuring consistent behavior across
all print library implementations.
Signed-off-by: Ray Ni <ray.ni@intel.com>
Diffstat (limited to 'MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode')
| -rw-r--r-- | MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/DebugLib.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/DebugLib.c b/MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/DebugLib.c index 6e39c271f1..666c6c9323 100644 --- a/MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/DebugLib.c +++ b/MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/DebugLib.c @@ -181,7 +181,7 @@ DebugPrintMarker ( // Parse Flags and Width
//
for (Format++; TRUE; Format++) {
- if ((*Format == '.') || (*Format == '-') || (*Format == '+') || (*Format == ' ')) {
+ if ((*Format == '.') || (*Format == '-') || (*Format == '+') || (*Format == ' ') || (*Format == ',')) {
//
// These characters in format field are omitted.
//
|
