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

Unified Diff: components/metrics/public/cpp/call_stack_profile_struct_traits.h

Issue 2532243002: Stack sampling profiler: fix module read validation failures (Closed)
Patch Set: Created 4 years, 1 month 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 | « no previous file | components/metrics/public/cpp/call_stack_profile_struct_traits_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/metrics/public/cpp/call_stack_profile_struct_traits.h
diff --git a/components/metrics/public/cpp/call_stack_profile_struct_traits.h b/components/metrics/public/cpp/call_stack_profile_struct_traits.h
index d2ec654205dfe019590e0d52f16b61edfd72e274..157ba7172ef9524a96df168e9516f7e1c0f8c7fd 100644
--- a/components/metrics/public/cpp/call_stack_profile_struct_traits.h
+++ b/components/metrics/public/cpp/call_stack_profile_struct_traits.h
@@ -34,13 +34,9 @@ struct StructTraits<metrics::mojom::CallStackModuleDataView,
static bool Read(metrics::mojom::CallStackModuleDataView data,
base::StackSamplingProfiler::Module* out) {
- // Linux has the longest build id at 40 bytes.
- static const size_t kMaxIDSize = 40;
-
std::string id;
base::FilePath filename;
- if (!data.ReadId(&id) || id.size() > kMaxIDSize ||
- !data.ReadFilename(&filename))
+ if (!data.ReadId(&id) || !data.ReadFilename(&filename))
return false;
*out =
« no previous file with comments | « no previous file | components/metrics/public/cpp/call_stack_profile_struct_traits_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698