summaryrefslogtreecommitdiffstats
path: root/ipc/ipc_channel_posix.cc
diff options
context:
space:
mode:
authorapatrick@google.com <apatrick@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-04 18:08:45 +0000
committerapatrick@google.com <apatrick@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-04 18:08:45 +0000
commit168ae92e90cafe51d7b4d62ce202a8aba093b88c (patch)
treeae330b8e28cc47d1b8dc5824cf01604e31b15be0 /ipc/ipc_channel_posix.cc
parent7fe2c0f6df1bf3bd495cf39f2cd7dcb515740455 (diff)
downloadchromium_src-168ae92e90cafe51d7b4d62ce202a8aba093b88c.zip
chromium_src-168ae92e90cafe51d7b4d62ce202a8aba093b88c.tar.gz
chromium_src-168ae92e90cafe51d7b4d62ce202a8aba093b88c.tar.bz2
Added new IPC message class for CommandBuffer.
Increased IPC message header type from 16 bits to 32 bits so it can accomodate more message classes. TEST=none BUG=none Review URL: http://codereview.chromium.org/399013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33832 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ipc/ipc_channel_posix.cc')
-rw-r--r--ipc/ipc_channel_posix.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/ipc/ipc_channel_posix.cc b/ipc/ipc_channel_posix.cc
index cce2c03..0d178d5 100644
--- a/ipc/ipc_channel_posix.cc
+++ b/ipc/ipc_channel_posix.cc
@@ -772,7 +772,9 @@ bool Channel::ChannelImpl::ProcessOutgoingMessages() {
reinterpret_cast<int*>(CMSG_DATA(cmsg)));
msgh.msg_controllen = cmsg->cmsg_len;
- msg->header()->num_fds = num_fds;
+ // DCHECK_LE above already checks that
+ // num_fds < MAX_DESCRIPTORS_PER_MESSAGE so no danger of overflow.
+ msg->header()->num_fds = static_cast<uint16>(num_fds);
#if defined(OS_LINUX)
if (!uses_fifo_ &&