MH2 | Check that subhal index is in range
For each HalProxy method that takes in a sensorHandle, the code now checks that the subhal index byte (first byte) of the handle is the range of subhals in list before indexing into mSubHalList so that are crash does not occur and returns Result::BAD_VALUE if that is the case. Add unit tests to assert that error is returned. Also change the methods that accept sensorHandles to int32_t type since that is the actual type defined in the HAL spec. Bug: 136511617 Test: Passing new unit tests. Change-Id: I5489e999bc5eaef1a21698bdbc0a0341bc88194c
Loading
Please register or sign in to comment