]> git.baikalelectronics.ru Git - kernel.git/commit
perf utils: use sizeof(buf) - 1 in readlink() call
authorTommi Rantala <tommi.t.rantala@nokia.com>
Wed, 22 Mar 2017 13:06:22 +0000 (15:06 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 27 Mar 2017 18:36:27 +0000 (15:36 -0300)
commit23af14dd47a47606f542830e31cc6d6186cffc33
tree27c578f26aafda5fe9d96f2770217d34712552bb
parent91805dfb65fb8283717db3d3b925a50ba9e18d9d
perf utils: use sizeof(buf) - 1 in readlink() call

Ensure that we have space for the null byte in buf.

Signed-off-by: Tommi Rantala <tommi.t.rantala@nokia.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20170322130624.21881-5-tommi.t.rantala@nokia.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/header.c