summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJaganath Kanakkassery <jaganath.k.os@gmail.com>2019-04-03 12:11:44 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-07-18 11:39:35 +0200
commitb162f19e6603571061b19dbb604a9883f0fa4ecc (patch)
tree1b403ec6661f31cbb13c58dd11356a8aaca91377 /net
parent2890a7faf552dd3e4e40e343610ba3e0ba5b788e (diff)
downloadlinux-stable-b162f19e6603571061b19dbb604a9883f0fa4ecc.tar.gz
linux-stable-b162f19e6603571061b19dbb604a9883f0fa4ecc.tar.bz2
linux-stable-b162f19e6603571061b19dbb604a9883f0fa4ecc.zip
Bluetooth: Fix incorrect pointer arithmatic in ext_adv_report_evt
commit cd9151b618da4723877bd94eae952f2e50acbc0e upstream. In ext_adv_report_event rssi comes before data (not after data as in legacy adv_report_evt) so "+ 1" is not required in the ptr arithmatic to point to next report. Signed-off-by: Jaganath Kanakkassery <jaganath.kanakkassery@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Wentao Guan <guanwentao@uniontech.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net')
-rw-r--r--net/bluetooth/hci_event.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 31ab3ae78792..83eaf11fca55 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -5448,7 +5448,7 @@ static void hci_le_adv_report_evt(struct hci_dev *hdev, struct sk_buff *skb)
bt_dev_err(hdev, "Dropping invalid advertising data");
}
- ptr += sizeof(*ev) + ev->length + 1;
+ ptr += sizeof(*ev) + ev->length;
}
hci_dev_unlock(hdev);