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; |