summaryrefslogtreecommitdiff
path: root/libc/async_safe/async_safe_log.cpp
diff options
context:
space:
mode:
authorRyan Prichard <rprichard@google.com>2018-05-01 17:59:59 -0700
committerRyan Prichard <rprichard@google.com>2018-05-01 17:59:59 -0700
commit5258c2518e582585e1b00097296053b334790d13 (patch)
tree2bab7c2f7ca9472ba4012a8515304d6fa45d2095 /libc/async_safe/async_safe_log.cpp
parenta27cadfa5fd75cd54e1597a13ed517fdd6909fe3 (diff)
Fix async_safe_fatal overflow handling
Bug: b/79116392 Test: manual Change-Id: I46cd1007be165489db27cdcd4b42ec69de40d645
Diffstat (limited to 'libc/async_safe/async_safe_log.cpp')
-rw-r--r--libc/async_safe/async_safe_log.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libc/async_safe/async_safe_log.cpp b/libc/async_safe/async_safe_log.cpp
index d5aad16d6..1018ef5e0 100644
--- a/libc/async_safe/async_safe_log.cpp
+++ b/libc/async_safe/async_safe_log.cpp
@@ -537,7 +537,7 @@ void async_safe_fatal_va_list(const char* prefix, const char* format, va_list ar
// Log to stderr for the benefit of "adb shell" users and gtests.
struct iovec iov[2] = {
- {msg, os.total}, {const_cast<char*>("\n"), 1},
+ {msg, strlen(msg)}, {const_cast<char*>("\n"), 1},
};
TEMP_FAILURE_RETRY(writev(2, iov, 2));