nl_recv(): Zero out sockaddr in case the caller forgot
This commit is contained in:
parent
9fbdf6c92a
commit
4fb528bbaf
1 changed files with 2 additions and 0 deletions
2
lib/nl.c
2
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;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue