Skip to content
Commit 30ba5b0e authored by Donald Yandt's avatar Donald Yandt Committed by Arnaldo Carvalho de Melo
Browse files

perf machine: Null-terminate version char array upon fgets(/proc/version) error



If fgets() fails due to any other error besides end-of-file, the version
char array may not even be null-terminated.

Signed-off-by: default avatarDonald Yandt <donald.yandt@gmail.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Avi Kivity <avi@scylladb.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Yanmin Zhang <yanmin_zhang@linux.intel.com>
Fixes: a1645ce1 ("perf: 'perf kvm' tool for monitoring guest performance from host")
Link: http://lkml.kernel.org/r/20190514110100.22019-1-donald.yandt@gmail.com


Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent bf6d18cf
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment