diff options
| author | Linus Walleij <[email protected]> | 2015-12-21 08:36:21 +0000 |
|---|---|---|
| committer | Linus Walleij <[email protected]> | 2015-12-21 08:36:21 +0000 |
| commit | 0529357f102b96f68bc199f858d1c3b07f4b674c (patch) | |
| tree | eaa047952a768099e00a5245afa0d84799df6990 /net/bluetooth/sco.c | |
| parent | gpio: pch: fix non-DT build (diff) | |
| parent | Linux 4.4-rc6 (diff) | |
| download | kernel-0529357f102b96f68bc199f858d1c3b07f4b674c.tar.gz kernel-0529357f102b96f68bc199f858d1c3b07f4b674c.zip | |
Merge tag 'v4.4-rc6' into devel
Linux 4.4-rc6
Diffstat (limited to 'net/bluetooth/sco.c')
| -rw-r--r-- | net/bluetooth/sco.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/bluetooth/sco.c b/net/bluetooth/sco.c index fe129663bd3f..f52bcbf2e58c 100644 --- a/net/bluetooth/sco.c +++ b/net/bluetooth/sco.c @@ -526,6 +526,9 @@ static int sco_sock_bind(struct socket *sock, struct sockaddr *addr, if (!addr || addr->sa_family != AF_BLUETOOTH) return -EINVAL; + if (addr_len < sizeof(struct sockaddr_sco)) + return -EINVAL; + lock_sock(sk); if (sk->sk_state != BT_OPEN) { |
