From 18aa6faf2e044bb22a6331a95b2319fa5f751ea8 Mon Sep 17 00:00:00 2001 From: Ben Hamilton Date: Fri, 26 May 2023 09:52:25 -0600 Subject: [PATCH] [Breakpad] Fix hex formatting for MinidumpCrashpadInfo::Print() The hex formatting in MinidumpCrashpadInfo::Print() was missing the leading 0, so byte values < 128 were not possible to decode. Change-Id: Ib355bcdaf86e91d644045df645fb4fa75332aa4b Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/4571100 Reviewed-by: Joshua Peraza --- src/processor/minidump.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/processor/minidump.cc b/src/processor/minidump.cc index f0f92534..83f72b97 100644 --- a/src/processor/minidump.cc +++ b/src/processor/minidump.cc @@ -5503,7 +5503,7 @@ void MinidumpCrashpadInfo::Print() { // Value represents something else. char buffer[3]; for (const uint8_t& v : annot.value) { - snprintf(buffer, sizeof(buffer), "%X", v); + snprintf(buffer, sizeof(buffer), "%02X", v); str_value.append(buffer); } }