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

Markus Elfring
2025-03-11T13:10:52Z

…
> +++ 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