diff options
author | Jeongsik Mun <jeongsik.mun@samsung.com> | 2021-02-10 16:59:21 +0900 |
---|---|---|
committer | Todd Kennedy <toddke@google.com> | 2021-03-15 16:30:49 -0700 |
commit | d1df8f4df2714a27da58c8677f2b2cf0224c5d4a (patch) | |
tree | 0ea8c1df575d3db501146c8fa492b85235beef45 /rs/java/android/renderscript/RenderScriptCacheDir.java | |
parent | 8dc4ecd2c839247a44be41b47eebe415e813725a (diff) |
Fix a bug in RuleIndexingController where StackOverflowError occurs
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
Diffstat (limited to 'rs/java/android/renderscript/RenderScriptCacheDir.java')
0 files changed, 0 insertions, 0 deletions