summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Graf <tgraf@redhat.com>2012-11-06 13:24:09 (GMT)
committerThomas Graf <tgraf@redhat.com>2012-11-06 13:24:09 (GMT)
commit220d8e141d22e6ef73b8b6b4b061a46f6c88c061 (patch)
tree362e53bc8e69e9873cc3f3d032ee33ee15aebaa0
parenteb3606690973420d3d402f1d8e4ac5c2b3304615 (diff)
downloadlibnl-220d8e141d22e6ef73b8b6b4b061a46f6c88c061.zip
libnl-220d8e141d22e6ef73b8b6b4b061a46f6c88c061.tar.gz
libnl-220d8e141d22e6ef73b8b6b4b061a46f6c88c061.tar.bz2
nl_recv: return NLE_INVAL if socket address pointer is NULL
-rw-r--r--lib/nl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/nl.c b/lib/nl.c
index 17bd834..161cfa5 100644
--- a/lib/nl.c
+++ b/lib/nl.c
@@ -464,7 +464,7 @@ int nl_recv(struct nl_sock *sk, struct sockaddr_nl *nla,
struct ucred* tmpcreds = NULL;
int retval = 0;
- if (!buf)
+ if (!buf || !nla)
return -NLE_INVAL;
if (sk->s_flags & NL_MSG_PEEK)