diff options
| author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2026-06-07 14:35:28 -0300 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2026-06-10 15:23:53 -0300 |
| commit | 227a8748742f0263f1fe3131449b44563b77a209 (patch) | |
| tree | fc6d313fff6d4854660533dfd12669389ac61943 /tools/perf/scripts/python/stackcollapse.py | |
| parent | cab3a9331ed0b3f884dd61c8a25b3cf123705982 (diff) | |
perf hists: Fix snprintf() in hists__scnprintf_title() UID filter path
hists__scnprintf_title() accumulates formatted output into a buffer
using scnprintf() for all filter clauses except the UID filter, which
uses snprintf(). If the buffer fills up and snprintf() returns more
than the remaining space, printed exceeds size and the next 'size -
printed' underflows, causing later scnprintf() calls to write past
the buffer.
Switch the UID filter clause to scnprintf() to match the rest of the
function.
Fixes: 25c312dbf88ca402 ("perf hists: Move hists__scnprintf_title() away from the TUI code")
Reported-by: sashiko-bot <sashiko-bot@kernel.org>
Reviewed-by: Ian Rogers <irogers@google.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Assisted-by: Claude:claude-opus-4.6
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions
