linux/drivers/net/wireless
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
..
admtek adm80211: move under admtek vendor directory 2015-11-17 19:49:19 +02:00
ath ath9k: fix buffer overrun for ar9287 2016-03-14 13:09:49 -04:00
atmel at76c50x-usb: avoid double usb_put_dev() after downloading internal firmware in at76_probe() 2016-03-07 14:24:06 +02:00
broadcom brcmfmac: Remove waitqueue_active check 2016-03-10 14:57:56 +02:00
cisco wireless: airo: re-use mac_pton() 2015-11-30 14:59:28 +02:00
intel * update GSCAN capabilities (Ayala) 2016-03-10 14:53:35 +02:00
intersil hostap: avoid uninitialized variable use in hfa384x_get_rid 2016-02-06 13:59:24 +02:00
marvell mwifiex: Empty Tx queue during suspend 2016-03-10 14:58:39 +02:00
mediatek mt7601u: do not free dma_buf when ivp allocation fails 2016-03-07 14:39:05 +02:00
ralink rt2x00: add new rt2800usb device Buffalo WLI-UC-G450 2016-03-07 14:27:35 +02:00
realtek rtl8xxxu: Temporarily disable 8192eu device init 2016-03-10 15:29:21 +02:00
rsi mac80211: pass block ack session timeout to to driver 2016-01-14 11:13:17 +01:00
st wireless: cw1200: use __maybe_unused to hide pm functions_ 2016-03-08 12:32:52 +02:00
ti wlcore/wl18xx: add radar_debug_mode handling 2016-03-10 15:00:23 +02:00
zydas zd1211rw: move under zydas vendor directory 2015-11-18 14:28:30 +02:00
Kconfig mac80211_hwsim: move Kconfig entry for sorting alphabetically 2015-11-18 15:23:36 +02:00
mac80211_hwsim.c mac80211_hwsim: use reset to set mac header 2016-03-04 22:45:13 -05:00
mac80211_hwsim.h
Makefile ath: unify Kconfig with other vendors 2015-11-18 14:28:31 +02:00
ray_cs.c
ray_cs.h
rayctl.h
rndis_wlan.c rndis_wlan: fix checking for default value 2015-09-22 16:14:32 -07:00
wl3501_cs.c
wl3501.h