Re: [PATCH v3 1/8] perf sched stats: Add record and rawdump support

From: Markus Elfring
Date: Tue Mar 11 2025 - 09:11:02 EST



> +++ b/tools/perf/builtin-sched.c

> +static int enable_sched_schedstats(int *reset)
> +{

> + ch = getc(fp);
> + if (ch == '0') {
> + *reset = 1;
> + rewind(fp);
> + putc('1', fp);
> + fclose(fp);
> + }
> + return 0;
> +}


Is the error detection incomplete so far?
https://cwe.mitre.org/data/definitions/252.html

Regards,
Markus