Skip to content
Commit 27635664 authored by Donald Yandt's avatar Donald Yandt Committed by Paul Gortmaker
Browse files

perf machine: Return NULL instead of null-terminating /proc/version array



commit 34b65aff upstream.

Return NULL instead of null-terminating version char array when fgets
fails due to end-of-file or error.

Signed-off-by: default avatarDonald Yandt <donald.yandt@gmail.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Yanmin Zhang <yanmin_zhang@linux.intel.com>
Fixes: 30ba5b0e ("perf machine: Null-terminate version char array upon fgets(/proc/version) error")
Link: http://lkml.kernel.org/r/20190528134128.30841-1-donald.yandt@gmail.com


Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
parent bcb49302
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