summaryrefslogtreecommitdiff
path: root/tools/perf
diff options
context:
space:
mode:
authorRoel Kluin <roel.kluin@gmail.com>2009-07-13 02:25:47 +0200
committerIngo Molnar <mingo@elte.hu>2009-07-13 10:58:28 +0200
commit23cdb5d5171d591ec911aada682e09d53c14a810 (patch)
tree3f2b2a4470fc5da8033494482367a27e69ec6ef9 /tools/perf
parentd4d7d0b9545721d3cabb19d15163bbc66b797707 (diff)
perf_counter tools: Fix index boundary check
Keep index within event_type_descriptors[] Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> LKML-Reference: <4A5A7F0B.4070106@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf')
-rw-r--r--tools/perf/util/parse-events.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index 518a33affe1..d18c98edd00 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@ -436,7 +436,7 @@ void print_events(void)
for (i = 0; i < ARRAY_SIZE(event_symbols); i++, syms++) {
type = syms->type + 1;
- if (type > ARRAY_SIZE(event_type_descriptors))
+ if (type >= ARRAY_SIZE(event_type_descriptors))
type = 0;
if (type != prev_type)