nl_recv: return NLE_INVAL if buf is NULL
This commit is contained in:
parent
fb42f19e2e
commit
eb36066909
1 changed files with 3 additions and 0 deletions
3
lib/nl.c
3
lib/nl.c
|
@ -464,6 +464,9 @@ int nl_recv(struct nl_sock *sk, struct sockaddr_nl *nla,
|
|||
struct ucred* tmpcreds = NULL;
|
||||
int retval = 0;
|
||||
|
||||
if (!buf)
|
||||
return -NLE_INVAL;
|
||||
|
||||
if (sk->s_flags & NL_MSG_PEEK)
|
||||
flags |= MSG_PEEK | MSG_TRUNC;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue