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

Commit 1cabad5e authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "audio HAL - fix UAFs" into sc-dev

parents d35e3a6a a8ac7cf7
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -413,8 +413,8 @@ Return<void> StreamIn::prepareForReading(uint32_t frameSize, uint32_t framesCoun

    // Create and launch the thread.
    auto tempReadThread =
        std::make_unique<ReadThread>(&mStopReadThread, mStream, tempCommandMQ.get(),
                                     tempDataMQ.get(), tempStatusMQ.get(), tempElfGroup.get());
            sp<ReadThread>::make(&mStopReadThread, mStream, tempCommandMQ.get(), tempDataMQ.get(),
                                 tempStatusMQ.get(), tempElfGroup.get());
    if (!tempReadThread->init()) {
        ALOGW("failed to start reader thread: %s", strerror(-status));
        sendError(Result::INVALID_ARGUMENTS);
@@ -430,7 +430,7 @@ Return<void> StreamIn::prepareForReading(uint32_t frameSize, uint32_t framesCoun
    mCommandMQ = std::move(tempCommandMQ);
    mDataMQ = std::move(tempDataMQ);
    mStatusMQ = std::move(tempStatusMQ);
    mReadThread = tempReadThread.release();
    mReadThread = tempReadThread;
    mEfGroup = tempElfGroup.release();
#if MAJOR_VERSION <= 6
    threadInfo.pid = getpid();
+3 −3
Original line number Diff line number Diff line
@@ -398,8 +398,8 @@ Return<void> StreamOut::prepareForWriting(uint32_t frameSize, uint32_t framesCou

    // Create and launch the thread.
    auto tempWriteThread =
        std::make_unique<WriteThread>(&mStopWriteThread, mStream, tempCommandMQ.get(),
                                      tempDataMQ.get(), tempStatusMQ.get(), tempElfGroup.get());
            sp<WriteThread>::make(&mStopWriteThread, mStream, tempCommandMQ.get(), tempDataMQ.get(),
                                  tempStatusMQ.get(), tempElfGroup.get());
    if (!tempWriteThread->init()) {
        ALOGW("failed to start writer thread: %s", strerror(-status));
        sendError(Result::INVALID_ARGUMENTS);
@@ -415,7 +415,7 @@ Return<void> StreamOut::prepareForWriting(uint32_t frameSize, uint32_t framesCou
    mCommandMQ = std::move(tempCommandMQ);
    mDataMQ = std::move(tempDataMQ);
    mStatusMQ = std::move(tempStatusMQ);
    mWriteThread = tempWriteThread.release();
    mWriteThread = tempWriteThread;
    mEfGroup = tempElfGroup.release();
#if MAJOR_VERSION <= 6
    threadInfo.pid = getpid();