aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/verify.c
diff options
context:
space:
mode:
authorGregg Townsend <gmt@cs.arizona.edu>1999-08-26 17:00:57 +0000
committerAlexandre Petit-Bianco <apbianco@gcc.gnu.org>1999-08-26 10:00:57 -0700
commitee5cd6389e7e061c5469e3cb28cfcad997970b65 (patch)
treeb8711823c88cd9416222ee9be36bf2899526543f /gcc/java/verify.c
parentb5a3b7379916acf848f01b1734a64005919b0b7a (diff)
downloadgcc-ee5cd6389e7e061c5469e3cb28cfcad997970b65.zip
gcc-ee5cd6389e7e061c5469e3cb28cfcad997970b65.tar.gz
gcc-ee5cd6389e7e061c5469e3cb28cfcad997970b65.tar.bz2
verify.c (verify_jvm_instructions): Don't check instruction validity beyond end of method.
Wed Aug 25 15:37:15 1999 Gregg Townsend <gmt@cs.arizona.edu> * verify.c (verify_jvm_instructions): Don't check instruction validity beyond end of method. From-SVN: r28897
Diffstat (limited to 'gcc/java/verify.c')
-rw-r--r--gcc/java/verify.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/java/verify.c b/gcc/java/verify.c
index d665a16..8b08a8a 100644
--- a/gcc/java/verify.c
+++ b/gcc/java/verify.c
@@ -400,7 +400,8 @@ verify_jvm_instructions (jcf, byte_ops, length)
|| handler_pc < 0 || handler_pc >= length
|| (handler_pc >= start_pc && handler_pc < end_pc)
|| ! (instruction_bits [start_pc] & BCODE_INSTRUCTION_START)
- || ! (instruction_bits [end_pc] & BCODE_INSTRUCTION_START)
+ || (end_pc < length &&
+ ! (instruction_bits [end_pc] & BCODE_INSTRUCTION_START))
|| ! (instruction_bits [handler_pc] & BCODE_INSTRUCTION_START))
{
error ("bad pc in exception_table");