net: netlink_getname, packet_getname -- use DECLARE_SOCKADDR guard
Use guard DECLARE_SOCKADDR in a few more places which allow us to catch if the structure copied back is too big. Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
37e8273cd3
commit
13cfa97bef
@@ -1537,7 +1537,7 @@ static int packet_getname(struct socket *sock, struct sockaddr *uaddr,
|
||||
struct net_device *dev;
|
||||
struct sock *sk = sock->sk;
|
||||
struct packet_sock *po = pkt_sk(sk);
|
||||
struct sockaddr_ll *sll = (struct sockaddr_ll *)uaddr;
|
||||
DECLARE_SOCKADDR(struct sockaddr_ll *, sll, uaddr);
|
||||
|
||||
if (peer)
|
||||
return -EOPNOTSUPP;
|
||||
|
Reference in New Issue
Block a user