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

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

Merge "libbinder: scope down Parcel data in RPC transact" am: 659917d3 am:...

Merge "libbinder: scope down Parcel data in RPC transact" am: 659917d3 am: e4954587 am: 3b3c0bd4

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

Change-Id: I7e8b3a7526a22967b8f38386c8ab22afad0588c8
parents a8666af8 3b3c0bd4
Loading
Loading
Loading
Loading
+10 −9
Original line number Diff line number Diff line
@@ -498,19 +498,20 @@ status_t RpcState::processTransactInternal(const base::unique_fd& fd,
        }
    }

    Parcel reply;
    reply.markForRpc(connection);

    if (replyStatus == OK) {
        Parcel data;
        // transaction->data is owned by this function. Parcel borrows this data and
        // only holds onto it for the duration of this function call. Parcel will be
        // deleted before the 'transactionData' object.
        data.ipcSetDataReference(transaction->data,
                                 transactionData.size() - offsetof(RpcWireTransaction, data),
                             nullptr /*object*/, 0 /*objectCount*/, do_nothing_to_transact_data);
                                 nullptr /*object*/, 0 /*objectCount*/,
                                 do_nothing_to_transact_data);
        data.markForRpc(connection);

    Parcel reply;
    reply.markForRpc(connection);

    if (replyStatus == OK) {
        if (target) {
            replyStatus = target->transact(transaction->code, data, &reply, transaction->flags);
        } else {