summaryrefslogtreecommitdiff
path: root/tools/aapt/Resource.cpp
diff options
context:
space:
mode:
author Songchun Fan <schfan@google.com> 2023-08-17 14:07:34 -0700
committer Song Chun Fan <schfan@google.com> 2023-08-17 22:04:00 +0000
commit26bf08812aae1ea4badafd1165c68ec679b7efb8 (patch)
treed032768a46a4373fb558144c82bbd268f8826b0f /tools/aapt/Resource.cpp
parent13399aefd2e89322eca95d7cfb4658e0eb422719 (diff)
[DO NOT MERGE] Handle out-of-bound array index in FastDataInput
Due to unknown reasons, SettingsProvider has been seeing corrupted xml files that can cause ArrayIndexOutOfBoundsException during parsing. When the exception is uncaught, it can cause system crashes and device boot loop. This CL prevents the exception by checking the index and array length before indexing. It throws an IOException when the index is out of bound, such that the SettingsProvider can handle it gracefully. BUG: 295555884 Test: builds Cherry-picked from ag/24450007 Change-Id: I7b6c7cf0b6150a3a4046ec35090a63c0912c80c8
Diffstat (limited to 'tools/aapt/Resource.cpp')
0 files changed, 0 insertions, 0 deletions