diff options
author | Max Bires <jbires@google.com> | 2017-09-14 13:01:28 -0700 |
---|---|---|
committer | Jeff Vander Stoep <jeffv@google.com> | 2018-05-03 15:25:02 -0700 |
commit | b8716687f18475ae3fc18ca78e454547c2e22d1f (patch) | |
tree | 82bbee9c3a59aa723e0902abe200c3c0a6856d85 /logd | |
parent | 708364e650a254dfcc1ac39a52a1894f30024d90 (diff) | |
download | system_core-b8716687f18475ae3fc18ca78e454547c2e22d1f.tar.gz system_core-b8716687f18475ae3fc18ca78e454547c2e22d1f.tar.bz2 system_core-b8716687f18475ae3fc18ca78e454547c2e22d1f.zip |
Fixing a bug introduced due to refactoring var names
SELinux messages weren't properly filtering into the events buffer
because message_len was being used to determine length of event data
instead of str_len
Bug: 65597269
Test: SELinux denials show up in the events buffer
Change-Id: I857e10211f71dd0db33a272241c7051c5d0c59ca
(cherry picked from commit 3a5acdaa8dfc6b4a3e6c546a46b68a3129d49853)
Diffstat (limited to 'logd')
-rwxr-xr-x | logd/LogAudit.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/logd/LogAudit.cpp b/logd/LogAudit.cpp index b76160df3..269db2ff0 100755 --- a/logd/LogAudit.cpp +++ b/logd/LogAudit.cpp @@ -331,7 +331,7 @@ int LogAudit::logPrint(const char* fmt, ...) { reinterpret_cast<android_log_event_string_t*>(buffer); event->header.tag = htole32(AUDITD_LOG_TAG); event->type = EVENT_TYPE_STRING; - event->length = htole32(message_len); + event->length = htole32(str_len); memcpy(event->data, str, str_len - bug_metadata.length()); memcpy(event->data + str_len - bug_metadata.length(), bug_metadata.c_str(), bug_metadata.length()); |