linux/net/bluetooth
Szymon Janc 2214cc8d58 Bluetooth: Fix using uninitialized option in RFCMode
commit 8f321f853e upstream.

If remote device sends bogus RFC option with invalid length,
undefined options values are used. Fix this by using defaults when
remote misbehaves.

This also fixes the following warning reported by gcc 4.7.0:

net/bluetooth/l2cap_core.c: In function 'l2cap_config_rsp':
net/bluetooth/l2cap_core.c:3302:13: warning: 'rfc.max_pdu_size' may be used uninitialized in this function [-Wmaybe-uninitialized]
net/bluetooth/l2cap_core.c:3266:24: note: 'rfc.max_pdu_size' was declared here
net/bluetooth/l2cap_core.c:3298:25: warning: 'rfc.monitor_timeout' may be used uninitialized in this function [-Wmaybe-uninitialized]
net/bluetooth/l2cap_core.c:3266:24: note: 'rfc.monitor_timeout' was declared here
net/bluetooth/l2cap_core.c:3297:25: warning: 'rfc.retrans_timeout' may be used uninitialized in this function [-Wmaybe-uninitialized]
net/bluetooth/l2cap_core.c:3266:24: note: 'rfc.retrans_timeout' was declared here
net/bluetooth/l2cap_core.c:3295:2: warning: 'rfc.mode' may be used uninitialized in this function [-Wmaybe-uninitialized]
net/bluetooth/l2cap_core.c:3266:24: note: 'rfc.mode' was declared here

Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-12-03 11:46:36 -08:00
..
bnep Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
cmtp Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
hidp Bluetooth: Use kernel int types instead of ones from stdint.h 2012-02-27 12:34:39 +02:00
rfcomm Bluetooth: RFCOMM - Fix info leak via getsockname() 2012-10-02 10:29:36 -07:00
af_bluetooth.c Bluetooth: notify userspace of security level change 2012-05-14 13:51:25 -04:00
hci_conn.c Bluetooth: Fix sending a HCI Authorization Request over LE links 2012-10-02 10:30:34 -07:00
hci_core.c Bluetooth: Fix not removing power_off delayed work 2012-10-02 10:30:08 -07:00
hci_event.c Bluetooth: Fix legacy pairing with some devices 2012-09-14 10:00:18 -07:00
hci_sock.c Bluetooth: HCI - Fix info leak via getsockname() 2012-10-02 10:29:36 -07:00
hci_sysfs.c Bluetooth: Use proper datatypes in release-callbacks 2012-02-13 17:01:38 +02:00
Kconfig Bluetooth: Fix Kconfig help description 2012-02-29 18:50:25 +02:00
l2cap_core.c Bluetooth: Fix using uninitialized option in RFCMode 2012-12-03 11:46:36 -08:00
l2cap_sock.c Bluetooth: Change signature of smp_conn_security() 2012-10-02 10:30:34 -07:00
lib.c Bluetooth: Add logging functions bt_info and bt_err 2012-02-17 11:33:17 +02:00
Makefile Bluetooth: Always compile SCO and L2CAP in Bluetooth Core 2011-12-21 02:21:08 -02:00
mgmt.c Bluetooth: mgmt: Fix enabling LE while powered off 2012-10-02 10:30:08 -07:00
sco.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
smp.c Bluetooth: SMP: Fix setting unknown auth_req bits 2012-10-31 10:03:02 -07:00