Skip to content

Commit 998b5a7

Browse files
aleksamagickagroeck
authored andcommitted
hwmon: (aquacomputer_d5next) Fix length of speed_input array
Commit 120584c ("hwmon: (aquacomputer_d5next) Add support for Octo flow sensor") added support for reading Octo flow sensor, but didn't update the priv->speed_input array length. Since Octo has 8 fans, with the addition of the flow sensor the proper length for speed_input is 9. Reported by Arne Schwabe on Github [1], who received a UBSAN warning. Fixes: 120584c ("hwmon: (aquacomputer_d5next) Add support for Octo flow sensor") Closes: aleksamagicka/aquacomputer_d5next-hwmon#100 [1] Reported-by: Arne Schwabe <[email protected]> Signed-off-by: Aleksa Savic <[email protected]> Message-ID: <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>
1 parent de2bf50 commit 998b5a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/hwmon/aquacomputer_d5next.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,7 @@ struct aqc_data {
597597

598598
/* Sensor values */
599599
s32 temp_input[20]; /* Max 4 physical and 16 virtual or 8 physical and 12 virtual */
600-
s32 speed_input[8];
600+
s32 speed_input[9];
601601
u32 speed_input_min[1];
602602
u32 speed_input_target[1];
603603
u32 speed_input_max[1];

0 commit comments

Comments
 (0)