The control message buffer is desclared in the if body
and then this buffer is used outside.
http://lists.infradead.org/pipermail/libnl/2015-November/002013.html
Signed-off-by: Andrew Vagin <avagin@virtuozzo.com>
Signed-off-by: Thomas Haller <thaller@redhat.com>
.msg_iov = iov,
.msg_iovlen = iovlen,
};
+ char buf[CMSG_SPACE(sizeof(struct ucred))];
/* Overwrite destination if specified in the message itself, defaults
* to the peer address of the socket.
/* Add credentials if present. */
creds = nlmsg_get_creds(msg);
if (creds != NULL) {
- char buf[CMSG_SPACE(sizeof(struct ucred))];
struct cmsghdr *cmsg;
hdr.msg_control = buf;