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

Commit 4e97f8c6 authored by Android (Google) Code Review's avatar Android (Google) Code Review Committed by The Android Open Source Project
Browse files

am d50a458b: Merge change 2351 into donut

Merge commit 'd50a458bb291801ab9fdc119301bc7b84b42a6e3'

* commit 'd50a458bb291801ab9fdc119301bc7b84b42a6e3':
  Fix a major bug in Bundle when unparcelling from AIDL.
parents 19fbae08 b6333b34
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -409,12 +409,16 @@ status_t Parcel::appendFrom(Parcel *parcel, size_t offset, size_t len)
            mObjects[idx++] = off;
            mObjectsSize++;

            const flat_binder_object* flat
            flat_binder_object* flat
                = reinterpret_cast<flat_binder_object*>(mData + off);
            acquire_object(proc, *flat, this);

            // take note if the object is a file descriptor
            if (flat->type == BINDER_TYPE_FD) {
                // If this is a file descriptor, we need to dup it so the
                // new Parcel now owns its own fd, and can declare that we
                // officially know we have fds.
                flat->handle = dup(flat->handle);
                flat->cookie = (void*)1;
                mHasFds = mFdsKnown = true;
            }
        }