perf traceevent: Ensure read cmdlines are null terminated.
authorIan Rogers <irogers@google.com>
Fri, 26 Feb 2021 22:14:31 +0000 (14:14 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Mar 2021 16:06:17 +0000 (17:06 +0100)
commit57a798e4a197a3d6f559b38397168988e952828d
tree1cf6bf658f8396f0b281ab057d5972a2bdd35780
parente4f7ffaa7cdfe7b680ede760f3a3ad5e1d12f049
perf traceevent: Ensure read cmdlines are null terminated.

commit 137a5258939aca56558f3a23eb229b9c4b293917 upstream.

Issue detected by address sanitizer.

Fixes: cd4ceb63438e9e28 ("perf util: Save pid-cmdline mapping into tracing header")
Signed-off-by: Ian Rogers <irogers@google.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lore.kernel.org/lkml/20210226221431.1985458-1-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/perf/util/trace-event-read.c