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

Unified Diff: ipc/ipc_message_utils.cc

Issue 2968003005: Support Serializing and Deserializing RepeatedField / RepeatedPtrField in IPC::Message (Closed)
Patch Set: Update IsPickleSizeSufficent to avoid GetSize Created 3 years, 5 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_message_utils.cc
diff --git a/ipc/ipc_message_utils.cc b/ipc/ipc_message_utils.cc
index 1a7966e8a14610e0df2bc13b412ea7d15a8f056a..e3a3d5e20c720cf6d830ac931e843079ef5fc0b8 100644
--- a/ipc/ipc_message_utils.cc
+++ b/ipc/ipc_message_utils.cc
@@ -568,6 +568,8 @@ bool ParamTraits<std::vector<bool>>::Read(const base::Pickle* m,
// ReadLength() checks for < 0 itself.
if (!iter->ReadLength(&size))
return false;
+ if (!IsPickleSizeSufficient<bool>(m, size))
+ return false;
r->resize(size);
for (int i = 0; i < size; i++) {
bool value;

Powered by Google App Engine
This is Rietveld 408576698