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

Commit e0cb1808 authored by Steven Moreland's avatar Steven Moreland
Browse files

RPC Binder: terminate session for bad dec strong

Not sure why we should allow this.

Bug: 416772676
Test: N/A
Change-Id: Id84fc3962645ce96e932d8a545112bbd3ba142d5
parent ffbfa5c1
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -1206,8 +1206,9 @@ status_t RpcState::processDecStrong(const sp<RpcSession::RpcConnection>& connect
    RpcMutexUniqueLock _l(mNodeMutex);
    auto it = mNodeForAddress.find(addr);
    if (it == mNodeForAddress.end()) {
        ALOGE("Unknown binder address %" PRIu64 " for dec strong.", addr);
        return OK;
        ALOGE("Unknown binder address %" PRIu64 " for dec strong. Terminating!", addr);
        (void)session->shutdownAndWait(false);
        return BAD_VALUE;
    }

    sp<IBinder> target = it->second.binder.promote();