linux/drivers/net/wireless/ath
Arnd Bergmann 83d6f1f15f ath9k: fix buffer overrun for ar9287
Code that was added back in 2.6.38 has an obvious overflow
when accessing a static array, and at the time it was added
only a code comment was put in front of it as a reminder
to have it reviewed properly.

This has not happened, but gcc-6 now points to the specific
overflow:

drivers/net/wireless/ath/ath9k/eeprom.c: In function 'ath9k_hw_get_gain_boundaries_pdadcs':
drivers/net/wireless/ath/ath9k/eeprom.c:483:44: error: array subscript is above array bounds [-Werror=array-bounds]
     maxPwrT4[i] = data_9287[idxL].pwrPdg[i][4];
                   ~~~~~~~~~~~~~~~~~~~~~~~~~^~~

It turns out that the correct array length exists in the local
'intercepts' variable of this function, so we can just use that
instead of hardcoding '4', so this patch changes all three
instances to use that variable. The other two instances were
already correct, but it's more consistent this way.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 940cd2c12e ("ath9k_hw: merge the ar9287 version of ath9k_hw_get_gain_boundaries_pdadcs")
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-03-14 13:09:49 -04:00
..
ar5523
ath5k ath5k: fix RTS/CTS by using proper rate flags 2015-12-08 16:50:24 +02:00
ath6kl ath6kl: add log messages for firmware failure cases. 2015-12-11 14:08:55 +02:00
ath9k ath9k: fix buffer overrun for ar9287 2016-03-14 13:09:49 -04:00
ath10k Merge 'net-next/master' 2016-03-06 14:57:44 +02:00
carl9170 carl9170: import 1.9.9 firmware headers 2016-03-07 14:11:09 +02:00
wcn36xx mac80211: pass block ack session timeout to to driver 2016-01-14 11:13:17 +01:00
wil6210 Merge 'net-next/master' 2016-03-06 14:57:44 +02:00
ath.h
debug.c ath: Make ath_opmode_to_string understand OCB mode 2015-08-10 22:21:15 +03:00
dfs_pattern_detector.c ath: fix DFS timestamp wraparound reset condition 2015-10-09 11:47:31 +03:00
dfs_pattern_detector.h ath: use PRI value given by spec for fixed PRI 2015-09-27 15:50:30 +03:00
dfs_pri_detector.c ath: use PRI value given by spec for fixed PRI 2015-09-27 15:50:30 +03:00
dfs_pri_detector.h
hw.c
Kconfig ath: unify Kconfig with other vendors 2015-11-18 14:28:31 +02:00
key.c
main.c
Makefile
reg.h
regd_common.h
regd.c
regd.h
spectral_common.h
trace.c
trace.h