Skip to contentSkip to conversation

Bluetooth: Fix corruption of device_connected pkt

PATCH Applied Brian Gix 2 participants 2 messages Mar 9, 2012 – Mar 16, 2012

Subsystems (2)
lore
Share & tools
lore

Brian Gix

author
#0 lore raw

PATCH 1/1 Bluetooth: Fix corruption of device_connected pkt

Incorrect pointer passed to eir_append_data made mgmt_device_connected event unparsable by mgmt user space entity.

---
 net/bluetooth/mgmt.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
net/bluetooth/mgmt.c +1 -1
index 97b5b6c..bcd632d 100644
@@ -2936,7 +2936,7 @@ int mgmt_device_connected(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type,
 					  name, name_len);
 
 	if (dev_class && memcmp(dev_class, "\0\0\0", 3) != 0)
-		eir_len = eir_append_data(&ev->eir[eir_len], eir_len,
+		eir_len = eir_append_data(ev->eir, eir_len,
 					  EIR_CLASS_OF_DEV, dev_class, 3);
 
 	put_unaligned_le16(eir_len, &ev->eir_len);
Signature · 1 line
1.7.8.3
#1 lore raw

Hi Brian,

Quoted 7 lines · Brian Gix

Incorrect pointer passed to eir_append_data made mgmt_device_connected event unparsable by mgmt user space entity.

---
 net/bluetooth/mgmt.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Applied to my bluetooth-next tree. Thanks.

Johan