Keep index within event_type_descriptors[]
PATCH 1/1 Keep index within event_type_descriptors[]
Keep index within event_type_descriptors[]
Signed-off-by Roel Kluin <[email protected]>
---
tools/perf/util/parse-events.c +1 -1
@@ -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)
[tip:perfcounters/urgent] perf_counter tools: Fix index boundary check
Commit-ID: 23cdb5d5171d591ec911aada682e09d53c14a810 Gitweb: http://git.kernel.org/tip/23cdb5d5171d591ec911aada682e09d53c14a810 Author: Roel Kluin <[email protected]> AuthorDate: Mon, 13 Jul 2009 02:25:47 +0200 Committer: Ingo Molnar <[email protected]> CommitDate: Mon, 13 Jul 2009 10:58:28 +0200
perf_counter tools: Fix index boundary check
Keep index within event_type_descriptors[]
Signed-off-by Roel Kluin <[email protected]>
Cc Andrew Morton <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Mike Galbraith <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Frederic Weisbecker <[email protected]>
LKML-Reference: <[email protected]>
Signed-off-by Ingo Molnar <[email protected]>
--- tools/perf/util/parse-events.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
tools/perf/util/parse-events.c +1 -1
@@ -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)