perf tools: Pre-check sample size before parsing
Check that the total size of the sample fields having a fixed
size do not exceed the one of the whole event. This robustifies
the sample parsing.
Signed-off-by:
Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Stephane Eranian <eranian@google.com>
Showing
- tools/perf/builtin-test.c 3 additions, 1 deletiontools/perf/builtin-test.c
- tools/perf/util/event.c 16 additions, 0 deletionstools/perf/util/event.c
- tools/perf/util/event.h 11 additions, 1 deletiontools/perf/util/event.h
- tools/perf/util/evsel.c 5 additions, 1 deletiontools/perf/util/evsel.c
- tools/perf/util/python.c 3 additions, 2 deletionstools/perf/util/python.c
- tools/perf/util/session.c 1 addition, 0 deletionstools/perf/util/session.c
- tools/perf/util/session.h 2 additions, 0 deletionstools/perf/util/session.h
Please register or sign in to comment