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 <jperaza@chromium.org>
This commit is contained in:
Brian Sheedy 2023-02-16 12:35:22 -08:00 committed by Joshua Peraza
parent 984e043d79
commit abb105db21

View file

@ -5492,7 +5492,7 @@ void MinidumpCrashpadInfo::Print() {
// Value represents something else. // Value represents something else.
char buffer[3]; char buffer[3];
for (const uint8_t& v : annot.value) { for (const uint8_t& v : annot.value) {
sprintf(buffer, "%X", v); snprintf(buffer, sizeof(buffer), "%X", v);
str_value.append(buffer); str_value.append(buffer);
} }
} }