Skip to content

Commit 0450570

Browse files
author
Ben Cheng
committed
Initialize bwr.read_buffer in IPCThreadState::talkWithDriver.
I/valgrind( 1309): ==1310== Syscall param ioctl(BINDER_WRITE_READ).read_buffer points to uninitialised byte(s) I/valgrind( 1309): ==1310== at 0x480E670: __ioctl (__ioctl.S:10) I/valgrind( 1309): ==1310== Address 0xbda651b4 is on thread 1's stack Change-Id: I02893df7b5786b6b2dbd9659f5706d7171295ab2
1 parent 88f10c6 commit 0450570

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

libs/binder/IPCThreadState.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -773,6 +773,7 @@ status_t IPCThreadState::talkWithDriver(bool doReceive)
773773
bwr.read_buffer = (long unsigned int)mIn.data();
774774
} else {
775775
bwr.read_size = 0;
776+
bwr.read_buffer = 0;
776777
}
777778

778779
IF_LOG_COMMANDS() {

0 commit comments

Comments
 (0)