diff options
Diffstat (limited to 'net/bluetooth')
-rw-r--r-- | net/bluetooth/l2cap.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c index 43e17f7d7ecd..7794a2e2adce 100644 --- a/net/bluetooth/l2cap.c +++ b/net/bluetooth/l2cap.c | |||
@@ -2832,6 +2832,11 @@ static inline int l2cap_config_rsp(struct l2cap_conn *conn, struct l2cap_cmd_hdr | |||
2832 | int len = cmd->len - sizeof(*rsp); | 2832 | int len = cmd->len - sizeof(*rsp); |
2833 | char req[64]; | 2833 | char req[64]; |
2834 | 2834 | ||
2835 | if (len > sizeof(req) - sizeof(struct l2cap_conf_req)) { | ||
2836 | l2cap_send_disconn_req(conn, sk); | ||
2837 | goto done; | ||
2838 | } | ||
2839 | |||
2835 | /* throw out any old stored conf requests */ | 2840 | /* throw out any old stored conf requests */ |
2836 | result = L2CAP_CONF_SUCCESS; | 2841 | result = L2CAP_CONF_SUCCESS; |
2837 | len = l2cap_parse_conf_rsp(sk, rsp->data, | 2842 | len = l2cap_parse_conf_rsp(sk, rsp->data, |