Permalink
Browse files

Merge "Fix a possible off-by-one in the verifier."

  • Loading branch information...
2 parents 7c03fb7 + 0bd1551 commit 7798a614753251adf7a77835792d78db2e93f5ff @enh enh committed with android code review Jul 2, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 vm/analysis/CodeVerify.cpp
@@ -3797,7 +3797,7 @@ static bool doCodeVerification(VerifierData* vdata, RegisterTable* regTable)
if (instr == kPackedSwitchSignature ||
instr == kSparseSwitchSignature ||
instr == kArrayDataSignature ||
- (instr == OP_NOP &&
+ (instr == OP_NOP && (insnIdx + 1 < insnsSize) &&
(meth->insns[insnIdx+1] == kPackedSwitchSignature ||
meth->insns[insnIdx+1] == kSparseSwitchSignature ||
meth->insns[insnIdx+1] == kArrayDataSignature)))

0 comments on commit 7798a61

Please sign in to comment.