Home
last modified time | relevance | path

Searched hist:"402 dab548d0da38b260f3843225cdfd37d91f512" (Results 1 – 1 of 1) sorted by relevance

/linux/drivers/hwmon/pmbus/
H A Dmax20730.cdiff 402dab548d0da38b260f3843225cdfd37d91f512 Thu Oct 22 09:08:24 CEST 2020 Dan Carpenter <dan.carpenter@oracle.com> hwmon: (pmbus/max20730) use scnprintf() instead of snprintf()

The snprintf() function returns the number of characters which would
have been printed if there were enough space, but the scnprintf()
returns the number of characters which were actually printed. If the
buffer is not large enough, then using snprintf() would result in a
read overflow and an information leak.

Fixes: 8910c0bd533d ("hwmon: (pmbus/max20730) add device monitoring via debugfs")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20201022070824.GC2817762@mwanda
Signed-off-by: Guenter Roeck <linux@roeck-us.net>