Fix a possible off-by-one in the verifier.
The art version of 0bd15512ca35f8c77d743166807ce60684f21123.
Bug: http://code.google.com/p/android/issues/detail?id=10863
Change-Id: I633b8731d06c83d992229a5831176f0a2ae47046
diff --git a/src/verifier/method_verifier.cc b/src/verifier/method_verifier.cc
index 0a487e3..cc01224 100644
--- a/src/verifier/method_verifier.cc
+++ b/src/verifier/method_verifier.cc
@@ -1268,7 +1268,7 @@
if (insns[insn_idx] == Instruction::kPackedSwitchSignature ||
insns[insn_idx] == Instruction::kSparseSwitchSignature ||
insns[insn_idx] == Instruction::kArrayDataSignature ||
- (insns[insn_idx] == Instruction::NOP &&
+ (insns[insn_idx] == Instruction::NOP && (insn_idx + 1 < insns_size) &&
(insns[insn_idx + 1] == Instruction::kPackedSwitchSignature ||
insns[insn_idx + 1] == Instruction::kSparseSwitchSignature ||
insns[insn_idx + 1] == Instruction::kArrayDataSignature))) {