From: Jaganath Kanakkassery Date: Wed, 3 Apr 2019 06:41:44 +0000 (+0530) Subject: Bluetooth: Fix incorrect pointer arithmatic in ext_adv_report_evt X-Git-Tag: Ubuntu-5.13.0-19.19~8606^2~105^2~6 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=cd9151b618da4723877bd94eae952f2e50acbc0e;p=mirror_ubuntu-jammy-kernel.git Bluetooth: Fix incorrect pointer arithmatic in ext_adv_report_evt 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 Signed-off-by: Marcel Holtmann --- diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index 609fd6871c5a..66b631ab0d35 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c @@ -5433,7 +5433,7 @@ static void hci_le_ext_adv_report_evt(struct hci_dev *hdev, struct sk_buff *skb) ev->data, ev->length); } - ptr += sizeof(*ev) + ev->length + 1; + ptr += sizeof(*ev) + ev->length; } hci_dev_unlock(hdev);