summaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-top.c
diff options
context:
space:
mode:
authorStephane Eranian2012-01-20 10:49:12 +0100
committerArnaldo Carvalho de Melo2012-01-31 01:29:12 +0100
commitd8d9c282a1abbe2baf6d22f959e6adf4c90629bf (patch)
tree1ad705b41912395bfc9c056ed1f6c18aaeb29c5e /tools/perf/builtin-top.c
parentperf tools: Fix broken build by defining _GNU_SOURCE in Makefile (diff)
downloadkernel-qcow2-linux-d8d9c282a1abbe2baf6d22f959e6adf4c90629bf.tar.gz
kernel-qcow2-linux-d8d9c282a1abbe2baf6d22f959e6adf4c90629bf.tar.xz
kernel-qcow2-linux-d8d9c282a1abbe2baf6d22f959e6adf4c90629bf.zip
perf tools: Fix strlen() bug in perf_event__synthesize_event_type()
The event_type record has a max length for the event name. It's called MAX_EVENT_NAME. The name may be truncated to fit the max length. But the header.size still reflects the original name length. If that length is > MAX_EVENT_NAME, then the header.size field is bogus. Fix this by using the length of the name after the potential truncation. Cc: David Ahern <dsahern@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20120120094912.GA4882@quad Signed-off-by: Stephane Eranian <eranian@google.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-top.c')
0 files changed, 0 insertions, 0 deletions