Message ID | 1457565136-13479-1-git-send-email-kamal@canonical.com |
---|---|
State | New |
Headers | show |
diff --git a/net/iucv/af_iucv.c b/net/iucv/af_iucv.c index 1465363..bb3969a 100644 --- a/net/iucv/af_iucv.c +++ b/net/iucv/af_iucv.c @@ -697,6 +697,9 @@ static int iucv_sock_bind(struct socket *sock, struct sockaddr *addr, if (!addr || addr->sa_family != AF_IUCV) return -EINVAL; + if (addr_len < sizeof(struct sockaddr_iucv)) + return -EINVAL; + lock_sock(sk); if (sk->sk_state != IUCV_OPEN) { err = -EBADFD;