OSDN Git Service

ART: Fix unchecked register index validity
authorAndreas Gampe <agampe@google.com>
Sun, 7 Sep 2014 20:06:12 +0000 (13:06 -0700)
committerAndreas Gampe <agampe@google.com>
Tue, 9 Sep 2014 05:08:53 +0000 (22:08 -0700)
commit376fa68f02d1cd56e506533a3ad16de4de88271d
tree9a462043cdacba41c96c6a1ee3c8ba08f904318b
parented20a4d80bcd8d47b5bcdd51ef17c786c0e5015c
ART: Fix unchecked register index validity

The static check of index validity is against the type given by
the instruction, e.g., boolean for SPUT_BOOLEAN, but the target_type
is the resolved field type and can differ. An additional check is
necessary to avoid a read out of bounds.

Bug: 17411109

(cherry picked from commit 74ae47a0590feceea31a2388f98c83e3ec0df0ec)

Change-Id: Ie4ed8bbda79f3f6403a24e727450a943447aa71d
runtime/verifier/method_verifier.cc