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

Commit bbafc2e1 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "libbinder: avoid uninteresting protocol version crash in fuzzer" am:...

Merge "libbinder: avoid uninteresting protocol version crash in fuzzer" am: fafdb185 am: ff741c67 am: ff68a53b

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



Change-Id: I4c1fb56a83ec370cae4c1103f51a68c1382186b6
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents f2b0478f ff68a53b
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -36,6 +36,11 @@ void fillRandomParcel(Parcel* p, FuzzedDataProvider&& provider, RandomParcelOpti
    if (provider.ConsumeBool()) {
        auto session = RpcSession::make(RpcTransportCtxFactoryRaw::make());
        CHECK_EQ(OK, session->addNullDebuggingClient());
        // Set the protocol version so that we don't crash if the session
        // actually gets used. This isn't cheating because the version should
        // always be set if the session init succeeded and we aren't testing the
        // session init here (it is bypassed by addNullDebuggingClient).
        session->setProtocolVersion(RPC_WIRE_PROTOCOL_VERSION);
        p->markForRpc(session);

        if (options->writeHeader) {