diff options
Diffstat (limited to 'libjava/verify.cc')
-rw-r--r-- | libjava/verify.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libjava/verify.cc b/libjava/verify.cc index a47571b..167d74c 100644 --- a/libjava/verify.cc +++ b/libjava/verify.cc @@ -2198,8 +2198,9 @@ private: // We only have to do this checking in the situation where // control flow falls through from the previous // instruction. Otherwise merging is done at the time we - // push the branch. - if (states[PC] != NULL) + // push the branch. Note that we'll catch the + // off-the-end problem just below. + if (PC < current_method->code_length && states[PC] != NULL) { // We've already visited this instruction. So merge // the states together. It is simplest, but not most |