Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(338)

Unified Diff: ipc/ipc_channel_reader.h

Issue 1345353004: Resize IPC input buffer to fit the next message. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix overflow test to actually overflow on 32-bit Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ipc/ipc_channel_reader.h
diff --git a/ipc/ipc_channel_reader.h b/ipc/ipc_channel_reader.h
index 3f3fc457954492b05b2a001d460fccc423052444..37ca9eda97c0896d739e9fe3c531872f1cbb8447 100644
--- a/ipc/ipc_channel_reader.h
+++ b/ipc/ipc_channel_reader.h
@@ -127,6 +127,8 @@ class IPC_EXPORT ChannelReader : public SupportsAttachmentBrokering,
private:
FRIEND_TEST_ALL_PREFIXES(ChannelReaderTest, AttachmentAlreadyBrokered);
FRIEND_TEST_ALL_PREFIXES(ChannelReaderTest, AttachmentNotYetBrokered);
+ FRIEND_TEST_ALL_PREFIXES(ChannelReaderTest, ResizeOverflowBuffer);
+ FRIEND_TEST_ALL_PREFIXES(ChannelReaderTest, InvalidMessageSize);
typedef std::set<BrokerableAttachment::AttachmentId> AttachmentIdSet;
@@ -156,6 +158,8 @@ class IPC_EXPORT ChannelReader : public SupportsAttachmentBrokering,
void StartObservingAttachmentBroker();
void StopObservingAttachmentBroker();
+ bool CheckMessageSize(size_t size);
Maria 2015/09/25 22:23:00 Comment?
Dmitry Skiba 2015/09/28 17:37:17 Done.
+
Listener* listener_;
// We read from the pipe into this buffer. Managed by DispatchInputData, do

Powered by Google App Engine
This is Rietveld 408576698