Skip to content

Commit

Permalink
NET: llc, zero sockaddr_llc struct
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jiri Slaby authored and David S. Miller committed Aug 24, 2009
1 parent 4871953 commit 28e9fc5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/llc/af_llc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 28e9fc5

Please sign in to comment.