Found and confirmed to work by albert chin (china@thewrittenword.com)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
msg->msg_control = NULL;
msg->msg_controllen = 0;
}
- return 0;
+ /*
+ * C99 doesn't allow 0-length arrays
+ */
+ return 1;
}
if (num_fds > INT8_MAX) {
return -1;
}
if ((msg == NULL) || (cmsg_space > bufsize)) {
- return cmsg_space;
+ /*
+ * C99 doesn't allow 0-length arrays
+ */
+ return MAX(cmsg_space, 1);
}
msg->msg_control = buf;