From: Thomas Graf Date: Tue, 6 Nov 2012 13:22:50 +0000 (+0100) Subject: nl_recv: return NLE_INVAL if buf is NULL X-Git-Tag: libnl3_2_15~50 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=eb3606690973420d3d402f1d8e4ac5c2b3304615;p=libnl nl_recv: return NLE_INVAL if buf is NULL --- diff --git a/lib/nl.c b/lib/nl.c index f4141e7..17bd834 100644 --- a/lib/nl.c +++ b/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;