NET: llc, zero sockaddr_llc struct
authorJiri Slaby <jirislaby@gmail.com>
Mon, 24 Aug 2009 05:55:51 +0000 (22:55 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 24 Aug 2009 05:55:51 +0000 (22:55 -0700)
sllc_arphrd member of sockaddr_llc might not be changed. Zero sllc
before copying to the above layer's structure.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/llc/af_llc.c

index 9208cf5..c45eee1 100644 (file)
@@ -914,6 +914,7 @@ static int llc_ui_getname(struct socket *sock, struct sockaddr *uaddr,
        struct llc_sock *llc = llc_sk(sk);
        int rc = 0;
 
+       memset(&sllc, 0, sizeof(sllc));
        lock_sock(sk);
        if (sock_flag(sk, SOCK_ZAPPED))
                goto out;