perf trace: Fix read_string()
authorIngo Molnar <mingo@elte.hu>
Thu, 3 Sep 2009 14:22:45 +0000 (16:22 +0200)
committerIngo Molnar <mingo@elte.hu>
Thu, 3 Sep 2009 14:22:45 +0000 (16:22 +0200)
commit6f4596d9312ba5fbf5f3231ef484823c4e684d2e
tree877465917e5d8afc46f4cc0907c2befd1dd104cc
parent00fc97863c21c41e257a941e83410c56341e2a5d
perf trace: Fix read_string()

We did not account for the enclosing \0. Depending on what malloc()
gave us this resulted in corrupted version string printouts.

Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
tools/perf/util/trace-event-read.c