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

Skip to content
Commit 8e6f31c1 authored by Brian Duddie's avatar Brian Duddie
Browse files

Avoid accessing failed HIDL Return contents

It's invalid to attempt to read the contents of a HIDL Return object
that has isOk() return false. This leads to a crash, so instead map
isOk() == false to DEAD_OBJECT in places where the return status is
used, and avoid otherwise avoid referencing the contents of the Return.

To facilitate testing, also add some additional informational logs for
cases when the sensor handles have changed after HAL restart.

Bug: 133497927
Test: use customized 2.0 HAL that crashes in activate call, confirm the
      HAL crash doesn't trigger system server crash due to invalid use
      of Return object
Change-Id: Ic094999ef20d90b538f757e34167155e83711b3d
parent 1db00e0a
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