Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 284321
b: refs/heads/master
c: c5993de
h: refs/heads/master
i:
  284319: 7d7bcc5
v: v3
  • Loading branch information
Andrei Emeltchenko authored and Gustavo F. Padovan committed Jan 3, 2012
1 parent 0d0efac commit c716e01
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3542b854bc26e5f8e42e0eab4d7f7453b74a362d
refs/heads/master: c5993de864d96b3656e9fca38c377b130105d97a
9 changes: 4 additions & 5 deletions trunk/net/bluetooth/hci_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -2271,20 +2271,19 @@ static inline void hci_num_comp_pkts_evt(struct hci_dev *hdev, struct sk_buff *s
struct hci_ev_num_comp_pkts *ev = (void *) skb->data;
int i;

skb_pull(skb, sizeof(*ev));

BT_DBG("%s num_hndl %d", hdev->name, ev->num_hndl);

if (hdev->flow_ctl_mode != HCI_FLOW_CTL_MODE_PACKET_BASED) {
BT_ERR("Wrong event for mode %d", hdev->flow_ctl_mode);
return;
}

if (skb->len < ev->num_hndl * 4) {
if (skb->len < sizeof(*ev) || skb->len < sizeof(*ev) +
ev->num_hndl * sizeof(struct hci_comp_pkts_info)) {
BT_DBG("%s bad parameters", hdev->name);
return;
}

BT_DBG("%s num_hndl %d", hdev->name, ev->num_hndl);

for (i = 0; i < ev->num_hndl; i++) {
struct hci_comp_pkts_info *info = &ev->handles[i];
struct hci_conn *conn;
Expand Down

0 comments on commit c716e01

Please sign in to comment.