summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/pwm-fan.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2020-10-22 10:08:24 +0300
committerGuenter Roeck <linux@roeck-us.net>2020-10-26 08:00:32 -0700
commit402dab548d0da38b260f3843225cdfd37d91f512 (patch)
tree3eb1cfdec5cace3462e184e99ce9a9ac4013bc60 /drivers/hwmon/pwm-fan.c
parent3650b228f83adda7e5ee532e2b90429c03f7b9ec (diff)
downloadlinux-stable-402dab548d0da38b260f3843225cdfd37d91f512.tar.gz
linux-stable-402dab548d0da38b260f3843225cdfd37d91f512.tar.bz2
linux-stable-402dab548d0da38b260f3843225cdfd37d91f512.zip
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>
Diffstat (limited to 'drivers/hwmon/pwm-fan.c')
0 files changed, 0 insertions, 0 deletions