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 3a5acdaa8d)
This commit is contained in:
parent
708364e650
commit
b8716687f1
1 changed files with 1 additions and 1 deletions
|
|
@ -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());
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue