summaryrefslogtreecommitdiff
path: root/net/unix
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@openvz.org>2009-11-08 08:51:19 +0300
committerDavid S. Miller <davem@davemloft.net>2009-11-11 07:54:41 +0300
commit13cfa97bef0f1172879f98307ac716acf3e9cea9 (patch)
tree012d5da286e39fbe94c7b100be9153a49191bd7e /net/unix
parent37e8273cd30592d3a82bcb70cbb1bdc4eaeb6b71 (diff)
downloadlinux-13cfa97bef0f1172879f98307ac716acf3e9cea9.tar.xz
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/unix')
-rw-r--r--net/unix/af_unix.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
index 178d3af2a605..7553ea6edd8f 100644
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -1259,7 +1259,7 @@ static int unix_getname(struct socket *sock, struct sockaddr *uaddr, int *uaddr_
{
struct sock *sk = sock->sk;
struct unix_sock *u;
- struct sockaddr_un *sunaddr = (struct sockaddr_un *)uaddr;
+ DECLARE_SOCKADDR(struct sockaddr_un *, sunaddr, uaddr);
int err = 0;
if (peer) {