diff options
author | Thomas Graf <tgraf@redhat.com> | 2012-11-06 14:22:50 +0100 |
---|---|---|
committer | Thomas Graf <tgraf@redhat.com> | 2012-11-06 14:22:50 +0100 |
commit | eb3606690973420d3d402f1d8e4ac5c2b3304615 (patch) | |
tree | b179f475f0b2ec56b3406cac301abd1b9fc18d58 | |
parent | fb42f19e2e2d02149049f3733f9a0131afc0fe65 (diff) | |
download | libnl-eb3606690973420d3d402f1d8e4ac5c2b3304615.tar.gz |
nl_recv: return NLE_INVAL if buf is NULL
-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; |