Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 203828
b: refs/heads/master
c: 51893f8
h: refs/heads/master
v: v3
  • Loading branch information
Nathan Holstein authored and Marcel Holtmann committed Jul 21, 2010
1 parent 6821738 commit c26dcd9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 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: bfbacc11550a785caf082f3ccfcd7ecf882e09a4
refs/heads/master: 51893f88dd916efead5e24a212c907b2cd35e160
8 changes: 4 additions & 4 deletions trunk/net/bluetooth/l2cap.c
Original file line number Diff line number Diff line change
Expand Up @@ -4092,9 +4092,9 @@ static inline int l2cap_data_channel(struct l2cap_conn *conn, u16 cid, struct sk
{
struct sock *sk;
struct l2cap_pinfo *pi;
u16 control, len;
u16 control;
u8 tx_seq, req_seq;
int next_tx_seq_offset, req_seq_offset;
int len, next_tx_seq_offset, req_seq_offset;

sk = l2cap_get_chan_by_scid(&conn->chan_list, cid);
if (!sk) {
Expand Down Expand Up @@ -4164,7 +4164,7 @@ static inline int l2cap_data_channel(struct l2cap_conn *conn, u16 cid, struct sk
}

if (__is_iframe(control)) {
if (len < 4) {
if (len < 0) {
l2cap_send_disconn_req(pi->conn, sk);
goto drop;
}
Expand Down Expand Up @@ -4192,7 +4192,7 @@ static inline int l2cap_data_channel(struct l2cap_conn *conn, u16 cid, struct sk
if (pi->fcs == L2CAP_FCS_CRC16)
len -= 2;

if (len > pi->mps || len < 4 || __is_sframe(control))
if (len > pi->mps || len < 0 || __is_sframe(control))
goto drop;

if (l2cap_check_fcs(pi, skb))
Expand Down

0 comments on commit c26dcd9

Please sign in to comment.