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

Unified Diff: tools/ipc_fuzzer/message_lib/message_file_reader.cc

Issue 1308613006: ipc: Update Message::FindNext to parse brokered attachments. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « ipc/ipc_message.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/ipc_fuzzer/message_lib/message_file_reader.cc
diff --git a/tools/ipc_fuzzer/message_lib/message_file_reader.cc b/tools/ipc_fuzzer/message_lib/message_file_reader.cc
index e93c460b7e287dbfc3012b789db3b505f7b44f25..b8c2bf431497a76418efb473318668683f90060b 100644
--- a/tools/ipc_fuzzer/message_lib/message_file_reader.cc
+++ b/tools/ipc_fuzzer/message_lib/message_file_reader.cc
@@ -108,13 +108,15 @@ bool Reader::ReadMessages() {
for (size_t i = 0; i < header_->message_count; ++i) {
const char* begin = file_data_.begin();
const char* end = file_data_.end();
- const char* message_tail = IPC::Message::FindNext(begin, end);
- if (!message_tail) {
+ Message::NextMessageInfo info;
+ IPC::Message::FindNext(begin, end, &info);
+ if (!info.message_found) {
LOG(ERROR) << "Failed to parse message.";
return false;
}
- size_t msglen = message_tail - begin;
+ CHECK_EQ(info.message_end, info.pickle_end);
+ size_t msglen = info.message_end - begin;
if (msglen > INT_MAX) {
LOG(ERROR) << "Message too large.";
return false;
« no previous file with comments | « ipc/ipc_message.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698