summaryrefslogtreecommitdiff
path: root/net/bluetooth/hci_codec.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/bluetooth/hci_codec.c')
-rw-r--r--net/bluetooth/hci_codec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bluetooth/hci_codec.c b/net/bluetooth/hci_codec.c
index 3cc135bb1d30..5bc5003c387c 100644
--- a/net/bluetooth/hci_codec.c
+++ b/net/bluetooth/hci_codec.c
@@ -100,7 +100,7 @@ static void hci_read_codec_capabilities(struct hci_dev *hdev, __u8 transport,
caps = (void *)skb->data;
if (skb->len < sizeof(*caps))
goto error;
- if (skb->len < caps->len)
+ if (skb->len < sizeof(caps->len) + caps->len)
goto error;
len += sizeof(caps->len) + caps->len;
skb_pull(skb, sizeof(caps->len) + caps->len);