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

Unified Diff: gpu/ipc/gpu_command_buffer_traits.cc

Issue 1383463005: Fix array out of bounds access in loop iteration in gpu ipc log (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reworked as per comments! Created 5 years, 2 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/ipc/gpu_command_buffer_traits.cc
diff --git a/gpu/ipc/gpu_command_buffer_traits.cc b/gpu/ipc/gpu_command_buffer_traits.cc
index 8d2148de0f7842d9741cbb61ba6fed3f18450810..ed43cd29d57dd8cee214057921d25b3bb426af61 100644
--- a/gpu/ipc/gpu_command_buffer_traits.cc
+++ b/gpu/ipc/gpu_command_buffer_traits.cc
@@ -115,11 +115,11 @@ bool ParamTraits<gpu::ValueState> ::Read(const Message* m,
void ParamTraits<gpu::ValueState>::Log(const param_type& p, std::string* l) {
l->append("<ValueState (");
- for (size_t i = 0; i < sizeof(p.int_value); ++i)
- *l += base::StringPrintf("%i ", p.int_value[i]);
+ for (int value : p.int_value)
+ *l += base::StringPrintf("%i ", value);
l->append(" int values ");
- for (size_t i = 0; i < sizeof(p.float_value); ++i)
- *l += base::StringPrintf("%f ", p.float_value[i]);
+ for (float value : p.float_value)
+ *l += base::StringPrintf("%f ", value);
l->append(" float values)>");
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698