Skip to content
Commit 256f3c15 authored by Siarhei Vishniakou's avatar Siarhei Vishniakou
Browse files

Prevent usage of freed memory by using getLights and getSensors

Instead of separately querying light ids and light infos, just provide a
list of light infos. They already contain the light ids.

This way, we also avoid leaving uninitialized array elements when the
lookup fails.

In the InputReader code, a lock is obtained when the light information
is being read, but that memory could change right after the call
completes.

Bug: 190126442
Test: atest inputflinger_tests libinput_tests
Change-Id: I16ef37dce96d7077a8634d565b573fc26f1ebb5d
parent 5ba9720d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment