All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Keep index within event_type_descriptors[]
@ 2009-07-13  0:25 Roel Kluin
  2009-07-13  9:01 ` [tip:perfcounters/urgent] perf_counter tools: Fix index boundary check tip-bot for Roel Kluin
  0 siblings, 1 reply; 2+ messages in thread
From: Roel Kluin @ 2009-07-13  0:25 UTC (permalink / raw)
  To: Ingo Molnar, LKML, Andrew Morton

Keep index within event_type_descriptors[]

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index 518a33a..d18c98e 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)

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-07-13  9:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-13  0:25 [PATCH] Keep index within event_type_descriptors[] Roel Kluin
2009-07-13  9:01 ` [tip:perfcounters/urgent] perf_counter tools: Fix index boundary check tip-bot for Roel Kluin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.