perf trace: Fix off by one string allocation problem
authorArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 17 Aug 2017 18:12:55 +0000 (15:12 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 17 Aug 2017 19:39:14 +0000 (16:39 -0300)
commitd6d4fc6fefda26a88eb99d30e87a8834c59c144a
tree0cfa282ccd810ab1a897852bbcd55d1ec9f0697d
parentc73881eeb1a0ee9b45d8bc9f45ab02e23d81c5c5
perf trace: Fix off by one string allocation problem

We need to consider the null terminator, oops, fix it.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Fixes: 017037ff3d0b ("perf trace: Allow specifying list of syscalls and events in -e/--expr/--event")
Link: http://lkml.kernel.org/n/tip-j79jpqqe91gvxqmsgxgfn2ni@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-trace.c