]> granicus.if.org Git - libnl/commitdiff
nl_recv: return NLE_INVAL if socket address pointer is NULL
authorThomas Graf <tgraf@redhat.com>
Tue, 6 Nov 2012 13:24:09 +0000 (14:24 +0100)
committerThomas Graf <tgraf@redhat.com>
Tue, 6 Nov 2012 13:24:09 +0000 (14:24 +0100)
lib/nl.c

index 17bd8340e04ad7ad8d8c058bc164de85ce8d16b6..161cfa5350a15b50b4f3d9bd44499b9b34827b03 100644 (file)
--- 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)