perf tools: Robustify dynamic sample content fetch
authorFrederic Weisbecker <fweisbec@gmail.com>
Sat, 21 May 2011 18:08:15 +0000 (20:08 +0200)
committerFrederic Weisbecker <fweisbec@gmail.com>
Sun, 22 May 2011 01:38:48 +0000 (03:38 +0200)
commit98e1da905cbe64bb023a165c7c01eef5e800609e
treec77e7a64263ecb8fc9f7971a44dd085f14f039f6
parenta285412479b6d5af3e48273a92ec2f1987df8cd1
perf tools: Robustify dynamic sample content fetch

Ensure the size of the dynamic fields such as callchains
or raw events don't overlap the whole event boundaries.

This prevents from dereferencing junk if the given size of
the callchain goes too eager.

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Reported-by: Ingo Molnar <mingo@elte.hu>
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>
tools/perf/util/evsel.c