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

Commit 9b9b3de1 authored by Eric Laurent's avatar Eric Laurent
Browse files

media utils: fix UAF in TimeCheckThread

Read log tag from request list under lock
to avoid use after free.

Bug: 142142406
Test: make
Change-Id: If4adab8c15a319dc84b7003adf3ac59a3980f075
parent d373b0ef
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -82,11 +82,11 @@ bool TimeCheck::TimeCheckThread::threadLoop()
        if (waitTimeNs > 0) {
            status = mCond.waitRelative(mMutex, waitTimeNs);
        }
    }
        if (status != NO_ERROR) {
            LOG_EVENT_STRING(LOGTAG_AUDIO_BINDER_TIMEOUT, tag);
            LOG_ALWAYS_FATAL("TimeCheck timeout for %s", tag);
        }
    }
    return true;
}