summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorSteven Rostedt2009-10-21 01:19:35 +0200
committerIngo Molnar2009-10-21 13:39:57 +0200
commit4e3b799d7dbb2a12ca8dca8d3594d32095772973 (patch)
tree784404eadda2611489b1fec26d42cd2563d7d407 /usr
parentperf tools: Add 'make DEBUG=1' to remove the -O6 cflag (diff)
downloadkernel-qcow2-linux-4e3b799d7dbb2a12ca8dca8d3594d32095772973.tar.gz
kernel-qcow2-linux-4e3b799d7dbb2a12ca8dca8d3594d32095772973.tar.xz
kernel-qcow2-linux-4e3b799d7dbb2a12ca8dca8d3594d32095772973.zip
perf tools: Use strsep() over strtok_r() for parsing single line
The second argument in the strtok_r() function is not to be used generically and can have different implementations. Currently the function parsing of the perf trace code uses the second argument to copy data from. This can crash the tool or just have unpredictable results. The correct solution is to use strsep() which has a defined result. I also added a check to see if the result was correct, and will break out of the loop in case it fails to parse as expected. Reported-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Frederic Weisbecker <fweisbec@gmail.com> LKML-Reference: <20091020232034.237814877@goodmis.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'usr')
0 files changed, 0 insertions, 0 deletions