diff options
-rw-r--r-- | lib/nl.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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; |