summaryrefslogtreecommitdiff
path: root/libs/binder/Parcel.cpp
diff options
context:
space:
mode:
author Arve Hjønnevåg <arve@android.com> 2014-02-21 23:45:01 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2014-02-21 23:45:01 +0000
commitd1c87d37025c49f6a47fe43328572da495ff04c1 (patch)
tree8dcd37a4da5ec0305626c34fd71133de7b984b3e /libs/binder/Parcel.cpp
parent9076fa78d2541fa14253aaf08e6445fafa17e35b (diff)
parent07fd0f195db6d341cab4e54257f508d802c98832 (diff)
Merge changes I3432d9d3,I90fcf538,I64398603
* changes: Binder: Fix some valgrind errors. Binder: Don't cast directly from a pointer to binder_uintptr_t Binder: Disable attemptIncStrongHandle
Diffstat (limited to 'libs/binder/Parcel.cpp')
-rw-r--r--libs/binder/Parcel.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/libs/binder/Parcel.cpp b/libs/binder/Parcel.cpp
index 03bcf01e52..9f56def83d 100644
--- a/libs/binder/Parcel.cpp
+++ b/libs/binder/Parcel.cpp
@@ -164,6 +164,7 @@ status_t flatten_binder(const sp<ProcessState>& /*proc*/,
}
const int32_t handle = proxy ? proxy->handle() : 0;
obj.type = BINDER_TYPE_HANDLE;
+ obj.binder = 0; /* Don't pass uninitialized stack data to a remote process */
obj.handle = handle;
obj.cookie = 0;
} else {
@@ -197,6 +198,7 @@ status_t flatten_binder(const sp<ProcessState>& /*proc*/,
}
const int32_t handle = proxy ? proxy->handle() : 0;
obj.type = BINDER_TYPE_WEAK_HANDLE;
+ obj.binder = 0; /* Don't pass uninitialized stack data to a remote process */
obj.handle = handle;
obj.cookie = 0;
} else {
@@ -748,6 +750,7 @@ status_t Parcel::writeFileDescriptor(int fd, bool takeOwnership)
flat_binder_object obj;
obj.type = BINDER_TYPE_FD;
obj.flags = 0x7f | FLAT_BINDER_FLAG_ACCEPTS_FDS;
+ obj.binder = 0; /* Don't pass uninitialized stack data to a remote process */
obj.handle = fd;
obj.cookie = takeOwnership ? 1 : 0;
return writeObject(obj, true);