From: Thomas Graf Date: Mon, 22 Nov 2010 13:19:40 +0000 (+0100) Subject: nl_recv(): Zero out sockaddr in case the caller forgot X-Git-Tag: libnl3_0~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4fb528bbaf59d6c0a90daf203f764cd181801e89;p=thirdparty%2Flibnl.git nl_recv(): Zero out sockaddr in case the caller forgot --- diff --git a/lib/nl.c b/lib/nl.c index 5616dcc..8f6f5f1 100644 --- a/lib/nl.c +++ b/lib/nl.c @@ -427,6 +427,8 @@ int nl_recv(struct nl_sock *sk, struct sockaddr_nl *nla, }; struct cmsghdr *cmsg; + memset(nla, 0, sizeof(*nla)); + if (sk->s_flags & NL_MSG_PEEK) flags |= MSG_PEEK;