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

Unified Diff: components/tracing/core/proto_utils.cc

Issue 2308583003: tracing v2: Introduce TraceBufferReader to read-back the trace buffer (Closed)
Patch Set: DISALLOW_COPY_AND_ASSIGN + cctype for isalnum Created 4 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: components/tracing/core/proto_utils.cc
diff --git a/components/tracing/core/proto_utils.cc b/components/tracing/core/proto_utils.cc
index 8e80d31c5069613bcbb5dd09ed88593167516169..0b410b49f3e444e3e27dbbb8a9839e39a7fa6bce 100644
--- a/components/tracing/core/proto_utils.cc
+++ b/components/tracing/core/proto_utils.cc
@@ -74,6 +74,7 @@ const uint8_t* ParseField(const uint8_t* start,
}
case kFieldTypeLengthDelimited: {
pos = ParseVarInt(pos, end, field_intvalue);
+ CHECK_LE(*field_intvalue, kMaxMessageLength);
pos += *field_intvalue;
CHECK_PTR_LE(pos, end);
break;

Powered by Google App Engine
This is Rietveld 408576698