Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b8716687 authored by Max Bires's avatar Max Bires Committed by Jeff Vander Stoep
Browse files

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 3a5acdaa)
parent 708364e6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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());