wifinative jni: check array length to prevent stack overflow

params.ap is an array with length MAX_HOTLIST_APS == 128
We should check that params.num_bssid does not exceed this value,
otherwise this could be a stack overflow security vulnerability.

CTS will be added in another CL.

Bug: 31856351
Change-Id: I807f349ceef5c2f5a46eec87515d3550f8288739
Test: compile, unit tests, manual test
Test: SafetyNet log not triggered under non-exploit conditions
Test: POC executable does not crash wifi anymore.
1 file changed
tree: dddbd13c5cbd1ff188ac9aa8d029c1ca79cf8c6c
  1. service/