diff options
-rw-r--r-- | chrome/common/ipc_channel_posix.cc | 2 | ||||
-rw-r--r-- | chrome/common/ipc_channel_posix.h | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/chrome/common/ipc_channel_posix.cc b/chrome/common/ipc_channel_posix.cc index bc77552..fc198e6 100644 --- a/chrome/common/ipc_channel_posix.cc +++ b/chrome/common/ipc_channel_posix.cc @@ -400,7 +400,7 @@ bool Channel::ChannelImpl::ProcessIncomingMessages() { } // a pointer to an array of |num_wire_fds| file descriptors from the read - const int* wire_fds; + const int* wire_fds = NULL; unsigned num_wire_fds = 0; // walk the list of control messages and, if we find an array of file diff --git a/chrome/common/ipc_channel_posix.h b/chrome/common/ipc_channel_posix.h index 4f4e0ef..555d463 100644 --- a/chrome/common/ipc_channel_posix.h +++ b/chrome/common/ipc_channel_posix.h @@ -80,7 +80,12 @@ class Channel::ChannelImpl : public MessageLoopForIO::Watcher { }; // This is a control message buffer large enough to hold kMaxReadFDs +#if defined(OS_MACOSX) + // TODO(agl): OSX appears to have non-constant CMSG macros! + char input_cmsg_buf_[1024]; +#else char input_cmsg_buf_[CMSG_SPACE(sizeof(int) * MAX_READ_FDS)]; +#endif // Large messages that span multiple pipe buffers, get built-up using // this buffer. |