]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Bluetooth: mgmt: Fix corruption of device_connected pkt
authorBrian Gix <bgix@codeaurora.org>
Fri, 9 Mar 2012 22:07:03 +0000 (14:07 -0800)
committerGustavo Padovan <gustavo@padovan.org>
Wed, 28 Mar 2012 14:39:06 +0000 (11:39 -0300)
Incorrect pointer passed to eir_append_data made mgmt_device_connected
event unparsable by mgmt user space entity.

Signed-off-by: Brian Gix <bgix@codeaurora.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
net/bluetooth/mgmt.c

index 97b5b6cd3f2ef39e25e7cf37fc6d75bcaba6cdba..bcd632d629c62be844914e799ac75bf74d151e82 100644 (file)
@@ -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);