perf build-id: Truncate to avoid overflowing the build_id data
authorIan Rogers <irogers@google.com>
Thu, 24 Jul 2025 16:32:42 +0000 (09:32 -0700)
committerNamhyung Kim <namhyung@kernel.org>
Thu, 24 Jul 2025 20:50:17 +0000 (13:50 -0700)
commit5a2ceebd8175874ae0e91a304ad6600d82806973
treec14b1773a389496d95238ee8e339f7a4f7f7f165
parentf3982385bc507991f1ed732c3c7907bff703f4d4
perf build-id: Truncate to avoid overflowing the build_id data

Warning when the build_id data would be overflowed would lead to
memory corruption, switch to truncation.

Signed-off-by: Ian Rogers <irogers@google.com>
Link: https://lore.kernel.org/r/20250724163302.596743-3-irogers@google.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
tools/perf/util/build-id.c