linux-uconsole/drivers/net/wireless
Arnd Bergmann 9a35bc2ae5 hostap: avoid uninitialized variable use in hfa384x_get_rid
commit 48dc5fb3ba upstream.

The driver reads a value from hfa384x_from_bap(), which may fail,
and then assigns the value to a local variable. gcc detects that
in in the failure case, the 'rlen' variable now contains
uninitialized data:

In file included from ../drivers/net/wireless/intersil/hostap/hostap_pci.c:220:0:
drivers/net/wireless/intersil/hostap/hostap_hw.c: In function 'hfa384x_get_rid':
drivers/net/wireless/intersil/hostap/hostap_hw.c:842:5: warning: 'rec' may be used uninitialized in this function [-Wmaybe-uninitialized]
  if (le16_to_cpu(rec.len) == 0) {

This restructures the function as suggested by Russell King, to
make it more readable and get more reliable error handling, by
handling each failure mode using a goto.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-30 05:49:28 +02:00
..
ath ath9k: fix NULL pointer dereference 2017-04-21 09:30:07 +02:00
b43 driver core update for 4.4-rc1 2015-11-04 21:50:37 -08:00
b43legacy debugfs: Pass bool pointer to debugfs_create_bool() 2015-10-04 11:36:07 +01:00
brcm80211 brcmfmac: avoid potential stack overflow in brcmf_cfg80211_start_ap() 2016-10-31 04:13:58 -06:00
cw1200 spi: Updates for v4.4 2015-11-05 13:15:12 -08:00
hostap hostap: avoid uninitialized variable use in hfa384x_get_rid 2017-04-30 05:49:28 +02:00
ipw2x00 drivers/net: get rid of unnecessary initializations in .get_drvinfo() 2015-10-16 00:24:10 -07:00
iwlegacy iwlegacy: avoid warning about missing braces 2016-09-30 10:18:36 +02:00
iwlwifi iwlwifi: pcie: fix SPLC structure parsing 2016-11-26 09:54:53 +01:00
libertas spi: Drop owner assignment from spi_drivers 2015-10-28 10:30:17 +09:00
libertas_tf
mediatek mac80211: allow to transmit A-MSDU within A-MPDU 2015-09-22 15:21:23 +02:00
mwifiex mwifiex: printk() overflow with 32-byte SSIDs 2016-12-08 07:15:24 +01:00
orinoco orinoco_usb: return error in ezusb_probe when alloc_orinocodev fails 2015-10-28 20:55:47 +02:00
p54 spi: Drop owner assignment from spi_drivers 2015-10-28 10:30:17 +09:00
prism54
realtek rtlwifi: rtl8192c-common: Fix "BUG: KASAN: 2017-03-12 06:37:30 +01:00
rsi mac80211: allow to transmit A-MSDU within A-MPDU 2015-09-22 15:21:23 +02:00
rt2x00 Here's another set of patches for the current cycle: 2015-10-22 07:28:41 -07:00
ti wlcore/wl12xx: spi: fix NULL pointer dereference (Oops) 2016-02-17 12:30:56 -08:00
zd1211rw
adm8211.c
adm8211.h
airo.c airo: fix scan after SIOCSIWAP (airo_set_wap) 2015-10-28 20:54:39 +02:00
airo.h
airo_cs.c
at76c50x-usb.c
at76c50x-usb.h
atmel.c
atmel.h
atmel_cs.c
atmel_pci.c
Kconfig New driver: rtl8xxxu (mac80211) 2015-10-21 10:53:29 +03:00
mac80211_hwsim.c mac80211_hwsim: Add missing check for HWSIM_ATTR_SIGNAL 2016-07-27 09:47:27 -07:00
mac80211_hwsim.h
Makefile rtlwifi: rtl818x: Move drivers into new realtek directory 2015-10-14 13:33:10 +03:00
mwl8k.c mac80211: allow to transmit A-MSDU within A-MPDU 2015-09-22 15:21:23 +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.h
wl3501_cs.c
zd1201.c
zd1201.h