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

Unified Diff: base/trace_event/trace_event_android.cc

Issue 1490763006: Fix buffer overflow in trace_event_android.cc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 | « base/trace_event/trace_event.gypi ('k') | base/trace_event/trace_event_android_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/trace_event/trace_event_android.cc
diff --git a/base/trace_event/trace_event_android.cc b/base/trace_event/trace_event_android.cc
index 4e578a5595116d128851d364275de7b31f19a8e0..01ca8e4d55c7975fb5284e364fc3a6020c21f832 100644
--- a/base/trace_event/trace_event_android.cc
+++ b/base/trace_event/trace_event_android.cc
@@ -25,7 +25,7 @@ void WriteToATrace(int fd, const char* buffer, size_t size) {
size_t total_written = 0;
while (total_written < size) {
ssize_t written = HANDLE_EINTR(write(
- fd, buffer + size, size - total_written));
+ fd, buffer + total_written, size - total_written));
if (written <= 0)
break;
total_written += written;
« no previous file with comments | « base/trace_event/trace_event.gypi ('k') | base/trace_event/trace_event_android_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698