]> git.karo-electronics.de Git - karo-tx-linux.git/commit
perf tools: Fix out-of-bound access to struct perf_session
authorRobert Richter <robert.richter@amd.com>
Thu, 1 Dec 2011 15:31:50 +0000 (16:31 +0100)
committerRobert Richter <robert.richter@amd.com>
Thu, 15 Dec 2011 13:28:02 +0000 (14:28 +0100)
commite837d343f31216db001a3b197d2ceaf9a1935457
tree43e2da3bca2de98beecf5a05d77770ec745467dd
parent9fc382dc3129a86804b6ab98f63c157b23f57200
perf tools: Fix out-of-bound access to struct perf_session

If filename is NULL there is an out-of-bound access to struct
perf_session if it would be used with perf_session__open(). Shouldn't
actually happen in current implementation as filename is always
!NULL. Fixing this by always null-terminating filename.

Signed-off-by: Robert Richter <robert.richter@amd.com>
tools/perf/util/session.c
tools/perf/util/session.h