From 07fd0f195db6d341cab4e54257f508d802c98832 Mon Sep 17 00:00:00 2001 From: Arve Hjønnevåg Date: Tue, 18 Feb 2014 21:10:29 -0800 Subject: 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 --- libs/binder/IPCThreadState.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'libs/binder/IPCThreadState.cpp') 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; -- cgit v1.2.3-59-g8ed1b