summaryrefslogtreecommitdiff
path: root/boot/1.1/default/BootControl.cpp
diff options
context:
space:
mode:
authorStan Rokita <srok@google.com>2019-10-17 11:58:02 -0700
committerStan Rokita <srok@google.com>2019-10-18 12:12:47 -0700
commite0721534748f45daf0e41c24c368494c10fb787d (patch)
treef03ba543d1bf7d9be5f5b4963fe5f292af86e985 /boot/1.1/default/BootControl.cpp
parentc913c85b2e4db672b4726b71b4185552497bb3e2 (diff)
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
Diffstat (limited to 'boot/1.1/default/BootControl.cpp')
0 files changed, 0 insertions, 0 deletions