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

Commit a588da3e authored by Steven Moreland's avatar Steven Moreland Committed by Gerrit Code Review
Browse files

Merge "libbinder: disallow upgrade of explicit version"

parents a42cf8d6 40b736e0
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;
}