Re: [PATCH] mtd: core: Convert sysfs sprintf/snprintf family to sysfs_emit

Richard Weinberger
2021-04-12T08:26:35Z

> understand.
>
> What do you think of the following commit message
>
> Use sysfs_emit instead of snprintf to avoid buf overrun,because in
> sysfs_emit it strictly checks
>
> whether buf is null or buf whether pagesize aligned, otherwise it
> returns an error.

This makes perfectly sense! :-)
Additional you can also not that this issue was found by coccicheck.