From 220d8e141d22e6ef73b8b6b4b061a46f6c88c061 Mon Sep 17 00:00:00 2001 From: Thomas Graf Date: Tue, 6 Nov 2012 14:24:09 +0100 Subject: [PATCH] nl_recv: return NLE_INVAL if socket address pointer is NULL --- lib/nl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- 2.40.0