diff options
author | Thomas Graf <tgraf@suug.ch> | 2010-11-22 13:19:40 (GMT) |
---|---|---|
committer | Thomas Graf <tgraf@suug.ch> | 2010-11-22 13:19:40 (GMT) |
commit | 4fb528bbaf59d6c0a90daf203f764cd181801e89 (patch) | |
tree | e1fd56ef7eafdafee8fd88c1bfc129c4a60999da /lib | |
parent | 9fbdf6c92ac6e340725bf98decd63d558652c233 (diff) | |
download | libnl-4fb528bbaf59d6c0a90daf203f764cd181801e89.zip libnl-4fb528bbaf59d6c0a90daf203f764cd181801e89.tar.gz libnl-4fb528bbaf59d6c0a90daf203f764cd181801e89.tar.bz2 |
nl_recv(): Zero out sockaddr in case the caller forgot
Diffstat (limited to 'lib')
-rw-r--r-- | lib/nl.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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; |