diff options
author | Android (Google) Code Review <android-gerrit@google.com> | 2009-05-22 14:51:22 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2009-05-22 14:51:22 -0700 |
commit | d50a458bb291801ab9fdc119301bc7b84b42a6e3 (patch) | |
tree | cf9d282af5fe0be5ee6fd594442315883b4feb88 /libs/utils | |
parent | 4e1afc1a569d05cc6a1ee213c65ffb49513600ca (diff) | |
parent | 6aff905048ba3b03724f17e2aba9089872e14cd2 (diff) | |
download | frameworks_base-d50a458bb291801ab9fdc119301bc7b84b42a6e3.zip frameworks_base-d50a458bb291801ab9fdc119301bc7b84b42a6e3.tar.gz frameworks_base-d50a458bb291801ab9fdc119301bc7b84b42a6e3.tar.bz2 |
Merge change 2351 into donut
* changes:
Fix a major bug in Bundle when unparcelling from AIDL.
Diffstat (limited to 'libs/utils')
-rw-r--r-- | libs/utils/Parcel.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libs/utils/Parcel.cpp b/libs/utils/Parcel.cpp index e74ad4a..b0e3750 100644 --- a/libs/utils/Parcel.cpp +++ b/libs/utils/Parcel.cpp @@ -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; } } |