Commit d6bcae6d authored by Vladimir Marko's avatar Vladimir Marko
Browse files

Fix ProtoId ordering check in DexFileVerifier.

The code previously checked for kNoDexIndex16 as the type
list terminator. This is incorrect as we should not actually
see the kNoDexIndex16 in type lists in supported dex files.

To make sure that we don't see kNoDexIndex16, check the size
of the arrays with documented limits, i.e. type-ids and
proto-ids, see dex_file.h. In the ProtoId ordering check,
DCHECK() that we don't encounter kNoDexIndex16 and verify
that the previous list is not longer if the current list's
elements match.

Bug: 28580925

(cherry picked from commit 0ca8add2)

Change-Id: Ied6dcbd8d04e3dfef5695dbd9b3a30a079038b2b
parent 23fddf80
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment