aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorRoel Kluin <roel.kluin@gmail.com>2009-07-12 20:25:47 -0400
committerIngo Molnar <mingo@elte.hu>2009-07-13 04:58:28 -0400
commit23cdb5d5171d591ec911aada682e09d53c14a810 (patch)
tree3f2b2a4470fc5da8033494482367a27e69ec6ef9 /tools
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')
-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 518a33affe1a..d18c98edd00d 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@ -436,7 +436,7 @@ void print_events(void)
436 436
437 for (i = 0; i < ARRAY_SIZE(event_symbols); i++, syms++) { 437 for (i = 0; i < ARRAY_SIZE(event_symbols); i++, syms++) {
438 type = syms->type + 1; 438 type = syms->type + 1;
439 if (type > ARRAY_SIZE(event_type_descriptors)) 439 if (type >= ARRAY_SIZE(event_type_descriptors))
440 type = 0; 440 type = 0;
441 441
442 if (type != prev_type) 442 if (type != prev_type)