nl_recv: return NLE_INVAL if socket address pointer is NULL

This commit is contained in:
Thomas Graf 2012-11-06 14:24:09 +01:00
parent eb36066909
commit 220d8e141d

View file

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