linux-hardened/net/bluetooth
Szymon Janc 8f321f853e Bluetooth: Fix using uninitialized option in RFCMode
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>
2012-06-11 23:50:28 -03:00
..
bnep Merge git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next 2012-05-22 15:18:06 -04:00
cmtp Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
hidp HID: Create a common generic driver 2012-05-01 12:54:55 +02:00
rfcomm tty: Revert the tty locking series, it needs more work 2012-06-02 15:21:43 -07:00
af_bluetooth.c Bluetooth: Fix checking the wrong flag when accepting a socket 2012-06-05 06:26:26 +03:00
hci_conn.c Bluetooth: Remove unused hci_le_ltk_neg_reply() 2012-05-09 01:40:51 -03:00
hci_core.c Bluetooth: Fix packet size provided to the controller 2012-05-16 16:12:49 -03:00
hci_event.c Bluetooth: Add support for encryption key refresh 2012-06-08 21:00:40 -03:00
hci_sock.c Merge branch 'x86-x32-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2012-03-29 18:12:23 -07:00
hci_sysfs.c Bluetooth: trivial: Correct types 2012-05-09 00:41:31 -03: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-06-11 23:50:28 -03:00
l2cap_sock.c Bluetooth: Create flags for bt_sk() 2012-05-16 16:14:17 -03: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: Fix LE pairing completion on connection failure 2012-06-08 02:50:57 -03:00
sco.c Bluetooth: Add dst_type parameter to hci_connect 2012-05-09 01:40:45 -03:00
smp.c Bluetooth: Fix SMP security elevation from medium to high 2012-06-08 03:58:34 -03:00