diff mbox

[v2,1/1] NET: llc, zero sockaddr_llc struct

Message ID 1251092619-3368-1-git-send-email-jirislaby@gmail.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Jiri Slaby Aug. 24, 2009, 5:43 a.m. UTC
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>
Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
---
 net/llc/af_llc.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Comments

David Miller Aug. 24, 2009, 5:55 a.m. UTC | #1
From: Jiri Slaby <jirislaby@gmail.com>
Date: Mon, 24 Aug 2009 07:43:39 +0200

> 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>

Applied, thanks Jiri.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/net/llc/af_llc.c b/net/llc/af_llc.c
index 9208cf5..c45eee1 100644
--- a/net/llc/af_llc.c
+++ b/net/llc/af_llc.c
@@ -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;