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

Commit 63b712dc authored by Steven Moreland's avatar Steven Moreland Committed by Automerger Merge Worker
Browse files

Merge "libbinder: disallow upgrade of explicit version" am: a588da3e am:...

Merge "libbinder: disallow upgrade of explicit version" am: a588da3e am: e326a110 am: 2e1c1d43

Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/1783312

Change-Id: I5142926e96edfb5dbf52f21e60de58f215168bb2
parents 4fea0ff0 2e1c1d43
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -87,6 +87,12 @@ bool RpcSession::setProtocolVersion(uint32_t version) {
    }

    std::lock_guard<std::mutex> _l(mMutex);
    if (mProtocolVersion && version > *mProtocolVersion) {
        ALOGE("Cannot upgrade explicitly capped protocol version %u to newer version %u",
              *mProtocolVersion, version);
        return false;
    }

    mProtocolVersion = version;
    return true;
}