linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: Fix incorrect pointer arithmatic in ext_adv_report_evt
@ 2019-04-03  6:41 Jaganath Kanakkassery
  2019-04-23 17:23 ` Marcel Holtmann
  0 siblings, 1 reply; 2+ messages in thread
From: Jaganath Kanakkassery @ 2019-04-03  6:41 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Jaganath Kanakkassery

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>
---
 net/bluetooth/hci_event.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 609fd68..66b631a 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);
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Bluetooth: Fix incorrect pointer arithmatic in ext_adv_report_evt
  2019-04-03  6:41 [PATCH] Bluetooth: Fix incorrect pointer arithmatic in ext_adv_report_evt Jaganath Kanakkassery
@ 2019-04-23 17:23 ` Marcel Holtmann
  0 siblings, 0 replies; 2+ messages in thread
From: Marcel Holtmann @ 2019-04-23 17:23 UTC (permalink / raw)
  To: Jaganath Kanakkassery; +Cc: linux-bluetooth, Jaganath Kanakkassery

Hi Jaganath,

> 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>
> ---
> net/bluetooth/hci_event.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

patch has been applied to bluetooth-next tree.

Regards

Marcel


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-04-23 17:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-03  6:41 [PATCH] Bluetooth: Fix incorrect pointer arithmatic in ext_adv_report_evt Jaganath Kanakkassery
2019-04-23 17:23 ` Marcel Holtmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).