Bug 834526, r=cjones.

This commit is contained in:
Ben Turner 2013-01-24 17:25:01 -08:00
parent 06d79bdc77
commit d48efc0c7a

View File

@ -642,7 +642,11 @@ bool Channel::ChannelImpl::ProcessOutgoingMessages() {
struct cmsghdr *cmsg;
const unsigned num_fds = msg->file_descriptor_set()->size();
DCHECK_LE(num_fds, FileDescriptorSet::MAX_DESCRIPTORS_PER_MESSAGE);
if (num_fds > FileDescriptorSet::MAX_DESCRIPTORS_PER_MESSAGE) {
LOG(FATAL) << "Too many file descriptors!";
// This should not be reached.
return false;
}
msgh.msg_control = buf;
msgh.msg_controllen = CMSG_SPACE(sizeof(int) * num_fds);