Re: [PATCH v2] tools/perf/util: null-terminate version char array upon error

2019-05-14 Thread Arnaldo Carvalho de Melo
Em Tue, May 14, 2019 at 07:01:00AM -0400, Donald Yandt escreveu: > If fgets fails due to any other error besides end-of-file, the version char > array may not even be null-terminated. Thanks, but out of curiosity, was this found just by visual inspection? Some static analysis tool? An actual prob

[PATCH v2] tools/perf/util: null-terminate version char array upon error

2019-05-14 Thread Donald Yandt
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: Donald Yandt --- tools/perf/util/machine.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.