From c26dcd9e39a89c66f04e6eec1f2fdf5d978d3b71 Mon Sep 17 00:00:00 2001 From: Nathan Holstein Date: Wed, 9 Jun 2010 15:46:25 -0400 Subject: [PATCH] --- yaml --- r: 203828 b: refs/heads/master c: 51893f88dd916efead5e24a212c907b2cd35e160 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/net/bluetooth/l2cap.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index d810d2be48d8..eef2b06c9b92 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: bfbacc11550a785caf082f3ccfcd7ecf882e09a4 +refs/heads/master: 51893f88dd916efead5e24a212c907b2cd35e160 diff --git a/trunk/net/bluetooth/l2cap.c b/trunk/net/bluetooth/l2cap.c index b89762134e4e..4af8fc0d512c 100644 --- a/trunk/net/bluetooth/l2cap.c +++ b/trunk/net/bluetooth/l2cap.c @@ -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) { @@ -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; } @@ -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))