summaryrefslogtreecommitdiff
path: root/libs/binder/Parcel.cpp
diff options
context:
space:
mode:
author Arve Hjønnevåg <arve@android.com> 2014-03-10 18:06:10 +0000
committer Android Git Automerger <android-git-automerger@android.com> 2014-03-10 18:06:10 +0000
commit614019cd1f73686f9f5883cf0a7505887f44af26 (patch)
tree5f18f95df721648e1be97ce96e3967f298865412 /libs/binder/Parcel.cpp
parent4ef023e9eb4c09bc121093a5a080b7cbbec2449b (diff)
parentd1c87d37025c49f6a47fe43328572da495ff04c1 (diff)
am d1c87d37: Merge changes I3432d9d3,I90fcf538,I64398603
* commit 'd1c87d37025c49f6a47fe43328572da495ff04c1': 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 88e20e4af5..003bddd83e 100644
--- a/libs/binder/Parcel.cpp
+++ b/libs/binder/Parcel.cpp
@@ -165,6 +165,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 {
@@ -198,6 +199,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 {
@@ -749,6 +751,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);