mISDN: Fixing missing validation in base_sock_bind()

Add validation code into mISDN/socket.c

Signed-off-by: Emrah Demir <ed@abdsec.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Emrah Demir 2016-04-08 22:16:11 +03:00 committed by David S. Miller
parent 70af921db6
commit b821646826

View file

@ -715,6 +715,9 @@ base_sock_bind(struct socket *sock, struct sockaddr *addr, int addr_len)
if (!maddr || maddr->family != AF_ISDN)
return -EINVAL;
if (addr_len < sizeof(struct sockaddr_mISDN))
return -EINVAL;
lock_sock(sk);
if (_pms(sk)->dev) {