From abb105db21e962eda5b7d9b7a0ac8dd701e0b987 Mon Sep 17 00:00:00 2001 From: Brian Sheedy Date: Thu, 16 Feb 2023 12:35:22 -0800 Subject: [PATCH] Fix sprintf usage Changes a recent introduction of sprintf to snprintf since sprintf is deprecated in Chromium. Bug: crashpad:329 Change-Id: Icd346da4c86bd8e867266dfebaf617991dd90113 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/4261633 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 2df932f4..8c4f75d6 100644 --- a/src/processor/minidump.cc +++ b/src/processor/minidump.cc @@ -5492,7 +5492,7 @@ void MinidumpCrashpadInfo::Print() { // Value represents something else. char buffer[3]; for (const uint8_t& v : annot.value) { - sprintf(buffer, "%X", v); + snprintf(buffer, sizeof(buffer), "%X", v); str_value.append(buffer); } }