mirror of
https://github.com/electrified/asus-wmi-sensors.git
synced 2024-06-02 03:15:30 +00:00
Integrate buffer overflow fix
Original commit message: Smatch detects this array overflow: drivers/hwmon/asus_wmi_sensors.c:569 asus_wmi_configure_sensor_setup() error: buffer overflow 'hwmon_attributes' 8 <= 9 The hwmon_attributes[] array should have "hwmon_max" so that it gets larger when more attributes are added.
This commit is contained in:
parent
0f048ae281
commit
0c85c92a39
|
@ -125,7 +125,7 @@ static enum hwmon_sensor_types asus_data_types[] = {
|
||||||
[WATER_FLOW] = hwmon_fan,
|
[WATER_FLOW] = hwmon_fan,
|
||||||
};
|
};
|
||||||
|
|
||||||
static u32 hwmon_attributes[] = {
|
static u32 hwmon_attributes[hwmon_max] = {
|
||||||
[hwmon_chip] = HWMON_C_REGISTER_TZ,
|
[hwmon_chip] = HWMON_C_REGISTER_TZ,
|
||||||
[hwmon_temp] = HWMON_T_INPUT | HWMON_T_LABEL,
|
[hwmon_temp] = HWMON_T_INPUT | HWMON_T_LABEL,
|
||||||
[hwmon_in] = HWMON_I_INPUT | HWMON_I_LABEL,
|
[hwmon_in] = HWMON_I_INPUT | HWMON_I_LABEL,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user