Skip to content
Commit 402dab54 authored by Dan Carpenter's avatar Dan Carpenter Committed by Guenter Roeck
Browse files

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: 8910c0bd ("hwmon: (pmbus/max20730) add device monitoring via debugfs")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20201022070824.GC2817762@mwanda


Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent 3650b228
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment