Em Thu, Jul 25, 2019 at 03:04:32PM -0400, Vince Weaver escreveu:
> 
> probably all perf_header_strings are affected by this.  The fuzzer just 
> tripped up cmdline now, which needs this fix.

I think we have to catch this earlier, i.e. when processing each
feature, lemme check...

- Arnaldo
 
> Signed-off-by: Vince Weaver <[email protected]>
> 
> diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
> index c24db7f4909c..631aa1911f3a 100644
> --- a/tools/perf/util/header.c
> +++ b/tools/perf/util/header.c
> @@ -1427,6 +1430,8 @@ static void print_cmdline(struct feat_fd *ff, FILE *fp)
>  
>       fprintf(fp, "# cmdline : ");
>  
> +     if (ff->ph->env.cmdline_argv==NULL) return;
> +
>       for (i = 0; i < nr; i++) {
>               char *argv_i = strdup(ff->ph->env.cmdline_argv[i]);
>               if (!argv_i) {

-- 

- Arnaldo

Reply via email to