summaryrefslogtreecommitdiffstats
path: root/ipc/ipc_sync_channel.cc
diff options
context:
space:
mode:
Diffstat (limited to 'ipc/ipc_sync_channel.cc')
-rw-r--r--ipc/ipc_sync_channel.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/ipc/ipc_sync_channel.cc b/ipc/ipc_sync_channel.cc
index 3aa7a26..5a100cf 100644
--- a/ipc/ipc_sync_channel.cc
+++ b/ipc/ipc_sync_channel.cc
@@ -382,6 +382,15 @@ bool SyncChannel::Send(Message* message) {
}
bool SyncChannel::SendWithTimeout(Message* message, int timeout_ms) {
+ if(message->size() > IPC::Channel::kMaximumMessageSize) {
+ LOG(ERROR) << "Attempt to send oversized message "
+ << message->size()
+ << " type="
+ << message->type();
+ delete message;
+ return false;
+ }
+
if (!message->is_sync()) {
ChannelProxy::Send(message);
return true;