Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 8c656c6c authored by Steven Moreland's avatar Steven Moreland
Browse files

libbinder_ndk_unit_test: show cookie can own data

The existing example is dangerous because it gives the
death recipient ownership of data on the stack. If the
test fails, then the callback would be referencing
invalid stack data.

Now, this example owns the cookie, so it is more clear
how to have the cookie contain arbitrary additional
data, and there is no longer a memory corruption issue
if the test happened to fail.

Fixes: 275407810
Test: libbinder_ndk_unit_test

Change-Id: I2b2ce675d3fae7e033bd701208b095ebe14da1e5
parent 71ea90d3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment