summaryrefslogtreecommitdiff
path: root/libs/binder/IPCThreadState.cpp
diff options
context:
space:
mode:
author Arve Hjønnevåg <arve@android.com> 2014-02-18 21:10:29 -0800
committer Arve Hjønnevåg <arve@android.com> 2014-02-18 21:14:41 -0800
commit07fd0f195db6d341cab4e54257f508d802c98832 (patch)
tree452ae075c4dc93a9a2d99d316d627bb4171ab2cf /libs/binder/IPCThreadState.cpp
parent87b30d0447829167b2d83f4f61f702638d937524 (diff)
Binder: Fix some valgrind errors.
When using 64 bit binder pointers, only initializing the 32 bit handle, in a stack allocated struct, will pass uninitialized stack data to the kernel and other processes. Change-Id: I3432d9d36bb251d8ddb0a863661aeb80aabb3d92
Diffstat (limited to 'libs/binder/IPCThreadState.cpp')
-rw-r--r--libs/binder/IPCThreadState.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/libs/binder/IPCThreadState.cpp b/libs/binder/IPCThreadState.cpp
index 65329f5e92..35dba12217 100644
--- a/libs/binder/IPCThreadState.cpp
+++ b/libs/binder/IPCThreadState.cpp
@@ -904,6 +904,7 @@ status_t IPCThreadState::writeTransactionData(int32_t cmd, uint32_t binderFlags,
{
binder_transaction_data tr;
+ tr.target.ptr = 0; /* Don't pass uninitialized stack data to a remote process */
tr.target.handle = handle;
tr.code = code;
tr.flags = binderFlags;