From: Guenter Roeck Date: Tue, 24 Jul 2012 03:57:16 +0000 (-0700) Subject: hwmon: (nct6775) Fix temp array overflow X-Git-Tag: nct6775-v0.9~8 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=6b4fdc1510363003aa228976270fb1916591aede;p=groeck-nct6775 hwmon: (nct6775) Fix temp array overflow With the addition of tempX_crit, there are four sets of temperature values in the temp[][] array, but it was declared with a size of three. Fix it. Signed-off-by: Guenter Roeck --- diff --git a/nct6775.c b/nct6775.c index 3592371..3213085 100644 --- a/nct6775.c +++ b/nct6775.c @@ -612,7 +612,8 @@ struct nct6775_data { u8 temp_fixed_num; /* 3 or 6 */ u8 temp_type[NUM_TEMP_FIXED]; s8 temp_offset[NUM_TEMP_FIXED]; - s16 temp[3][NUM_TEMP]; /* 0=temp, 1=temp_over, 2=temp_hyst */ + s16 temp[4][NUM_TEMP]; /* 0=temp, 1=temp_over, 2=temp_hyst, + * 3=temp_crit */ u64 alarms; u8 pwm_num; /* number of pwm */