diff options
author | Cyrill Gorcunov <gorcunov@openvz.org> | 2009-11-08 05:51:19 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-11-10 20:54:41 -0800 |
commit | 13cfa97bef0f1172879f98307ac716acf3e9cea9 (patch) | |
tree | 012d5da286e39fbe94c7b100be9153a49191bd7e /net/packet | |
parent | 37e8273cd30592d3a82bcb70cbb1bdc4eaeb6b71 (diff) | |
download | linux-stable-13cfa97bef0f1172879f98307ac716acf3e9cea9.tar.gz linux-stable-13cfa97bef0f1172879f98307ac716acf3e9cea9.tar.bz2 linux-stable-13cfa97bef0f1172879f98307ac716acf3e9cea9.zip |
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>
Diffstat (limited to 'net/packet')
-rw-r--r-- | net/packet/af_packet.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c index 3304caa65347..c620bd9ae3de 100644 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c @@ -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; |