perf evsel: Tidy up sample parsing overflow checking
authorAdrian Hunter <adrian.hunter@intel.com>
Tue, 27 Aug 2013 08:23:04 +0000 (11:23 +0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 29 Aug 2013 18:10:02 +0000 (15:10 -0300)
commit03b6ea9b91e0914caa847a1ade759af549555298
treec06dc11a4e6d2f95c51dd9f1160d392cbef45a82
parent314add6b1f045b59ca39683bd0cbc5310cd203f2
perf evsel: Tidy up sample parsing overflow checking

The size of data retrieved from a sample event must be validated to
ensure it does not go past the end of the event.  That was being done
sporadically and without considering integer overflows.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1377591794-30553-3-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/evsel.c