diff options
| author | Namhyung Kim <[email protected]> | 2024-08-10 19:15:02 +0000 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <[email protected]> | 2024-08-12 21:01:59 +0000 |
| commit | 00b04242683ebae91164244883b46e6ab2669d63 (patch) | |
| tree | 7a9d2789cc5a141fafd7371f454076a0d57c9731 /tools/perf/builtin-script.c | |
| parent | perf docs: Refine the description for the buffer size (diff) | |
| download | kernel-00b04242683ebae91164244883b46e6ab2669d63.tar.gz kernel-00b04242683ebae91164244883b46e6ab2669d63.zip | |
perf annotate-data: Fix a buffer overflow in TUI browser
In get_member_overhead(), k is updated when it has a entry in the
histogram. But the entry->hists array is allocated with the number of
evsel in the group. So the k should be reset when it iterates the event
using for_each_group_evsel(), otherwise it'd crash due to a buffer
overflow.
Fixes: cb1898f58e0f175d ("perf annotate-data: Support --skip-empty option")
Signed-off-by: Namhyung Kim <[email protected]>
Cc: Adrian Hunter <[email protected]>
Cc: Ian Rogers <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Kan Liang <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/builtin-script.c')
0 files changed, 0 insertions, 0 deletions
