aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/fpga/fpga-region.c
diff options
context:
space:
mode:
authorGuenter Roeck <[email protected]>2017-07-12 03:53:55 +0000
committerGuenter Roeck <[email protected]>2017-07-15 23:38:56 +0000
commit1009ccdc64ee2c8451f76b548589f6b989d13412 (patch)
tree1550e7c64fa36ed378ae26a874d9a694027d4d5a /drivers/fpga/fpga-region.c
parentLinux v4.13-rc1 (diff)
downloadkernel-1009ccdc64ee2c8451f76b548589f6b989d13412.tar.gz
kernel-1009ccdc64ee2c8451f76b548589f6b989d13412.zip
hwmon: (applesmc) Avoid buffer overruns
gcc 7.1 complains that the driver uses sprintf() and thus does not validate the length of output buffers. drivers/hwmon/applesmc.c: In function 'applesmc_show_fan_position': drivers/hwmon/applesmc.c:82:21: warning: '%d' directive writing between 1 and 5 bytes into a region of size 4 Fix the problem by using scnprintf() instead of sprintf() throughout the driver. Also explicitly limit the number of supported fans to avoid actual buffer overruns and thus invalid keys. Signed-off-by: Guenter Roeck <[email protected]>
Diffstat (limited to 'drivers/fpga/fpga-region.c')
0 files changed, 0 insertions, 0 deletions