diff options
author | Ingo Molnar <mingo@elte.hu> | 2011-08-18 21:51:44 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-08-18 21:51:44 +0200 |
commit | fe4c51b22080691792d3e28d86acb4d4ccb7e8e8 (patch) | |
tree | a88323ad10bb2ad6b19b5ea5fbb41a210096bd5f /tools/perf/util/parse-events.c | |
parent | 72ed62bdc46d76c965fb95aecb5d0bf97c976723 (diff) | |
parent | 43bece79796c2a39ec98998fd3f1071f04f3d8c3 (diff) |
Merge branch 'perf/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent
Diffstat (limited to 'tools/perf/util/parse-events.c')
-rw-r--r-- | tools/perf/util/parse-events.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c index 4ea7e19f5251..928918b796b2 100644 --- a/tools/perf/util/parse-events.c +++ b/tools/perf/util/parse-events.c @@ -697,7 +697,11 @@ parse_raw_event(const char **strp, struct perf_event_attr *attr) return EVT_FAILED; n = hex2u64(str + 1, &config); if (n > 0) { - *strp = str + n + 1; + const char *end = str + n + 1; + if (*end != '\0' && *end != ',' && *end != ':') + return EVT_FAILED; + + *strp = end; attr->type = PERF_TYPE_RAW; attr->config = config; return EVT_HANDLED; @@ -1097,6 +1101,4 @@ void print_events(const char *event_glob) printf("\n"); print_tracepoint_events(NULL, NULL); - - exit(129); } |