aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2015-12-15 15:39:08 -0500
committerMoyster <oysterized@gmail.com>2016-11-17 12:12:13 +0100
commita1f90bc3d2713fd06b7f72a5984b0f967d88ae5f (patch)
tree746486b9292ec734d5514df31249dc6106eae73c /net
parent7e0a1af9c94a7d83f4094a2eda2d28d9e91eb9ca (diff)
bluetooth: Validate socket address length in sco_sock_bind().
Change-Id: I890640975f1af64f71947b6a1820249e08f6375b Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/bluetooth/sco.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bluetooth/sco.c b/net/bluetooth/sco.c
index a31d0b9f1..6335af2a5 100644
--- a/net/bluetooth/sco.c
+++ b/net/bluetooth/sco.c
@@ -459,7 +459,7 @@ static int sco_sock_bind(struct socket *sock, struct sockaddr *addr, int alen)
if (!addr || addr->sa_family != AF_BLUETOOTH)
return -EINVAL;
- if (alen < sizeof(sa))
+ if (alen < sizeof(struct sockaddr_sco))
return -EINVAL;
memset(&sa, 0, sizeof(sa));