services/tests/servicestests/src/com/android/server/integrity/parser/RuleIndexingControllerTest.java
+18
−0
Loading
Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more
A map with a single entry passed into searchKeysRangeContainingKey() will lead to StackOverflowError due to infinite recursion. There is a possibility that it could happen if the indexing file is corrupted and has a few bytes. This fix adds a termination condition of recursion to break out and a check to make sure the indexing file is not corrupted. Test: atest FrameworksServicesTests:RuleIndexingControllerTest Bug: 178185562 Change-Id: Ic79584d7fabd56ae298d452060ce8d588bc02d21