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

hwmon: (asus_wmi_ec_sensors) fix array overflow



Smatch detected an array out of bounds error:

    drivers/hwmon/asus_wmi_ec_sensors.c:562 asus_wmi_ec_configure_sensor_setup()
    error: buffer overflow 'hwmon_attributes' 8 <= 9

The hwmon_attributes[] array needs to be declared with "hwmon_max"
elements.

Fixes: c04c7f7bfcbe ("hwmon: (asus_wmi_ec_sensors) Support B550 Asus WMI.")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20211130105034.GG5827@kili


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