diff options
Diffstat (limited to 'net/ieee802154')
-rw-r--r-- | net/ieee802154/af_ieee802154.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/ieee802154/af_ieee802154.c b/net/ieee802154/af_ieee802154.c index bad1c49fd960..01beb6c11205 100644 --- a/net/ieee802154/af_ieee802154.c +++ b/net/ieee802154/af_ieee802154.c | |||
@@ -126,6 +126,9 @@ static int ieee802154_sock_connect(struct socket *sock, struct sockaddr *uaddr, | |||
126 | { | 126 | { |
127 | struct sock *sk = sock->sk; | 127 | struct sock *sk = sock->sk; |
128 | 128 | ||
129 | if (addr_len < sizeof(uaddr->sa_family)) | ||
130 | return -EINVAL; | ||
131 | |||
129 | if (uaddr->sa_family == AF_UNSPEC) | 132 | if (uaddr->sa_family == AF_UNSPEC) |
130 | return sk->sk_prot->disconnect(sk, flags); | 133 | return sk->sk_prot->disconnect(sk, flags); |
131 | 134 | ||