diff options
author | DJ Delorie <dj@redhat.com> | 2006-01-03 22:06:18 +0000 |
---|---|---|
committer | DJ Delorie <dj@redhat.com> | 2006-01-03 22:06:18 +0000 |
commit | 54d46aca3532c1d74c3bbeb6ec2a389761f9663c (patch) | |
tree | c8b0f63d1fe075afbac435282a90a368271b915e /opcodes | |
parent | aab87437e37aed0bfdd76dd5d4a788ebd20a728d (diff) | |
download | gdb-54d46aca3532c1d74c3bbeb6ec2a389761f9663c.zip gdb-54d46aca3532c1d74c3bbeb6ec2a389761f9663c.tar.gz gdb-54d46aca3532c1d74c3bbeb6ec2a389761f9663c.tar.bz2 |
* cgen-ibld.in (extract_normal): Avoid memory range errors.
* m32c-ibld.c: Regenerated.
Diffstat (limited to 'opcodes')
-rw-r--r-- | opcodes/ChangeLog | 5 | ||||
-rw-r--r-- | opcodes/cgen-ibld.in | 7 | ||||
-rw-r--r-- | opcodes/m32c-ibld.c | 7 |
3 files changed, 11 insertions, 8 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index e465c8d..ba9d16d 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,8 @@ +2006-01-03 DJ Delorie <dj@redhat.com> + + * cgen-ibld.in (extract_normal): Avoid memory range errors. + * m32c-ibld.c: Regenerated. + 2005-12-27 Alan Modra <amodra@bigpond.net.au> * Makefile.am: Run "make dep-am". diff --git a/opcodes/cgen-ibld.in b/opcodes/cgen-ibld.in index 75506cd..77deeed 100644 --- a/opcodes/cgen-ibld.in +++ b/opcodes/cgen-ibld.in @@ -3,7 +3,7 @@ THIS FILE IS MACHINE GENERATED WITH CGEN: Cpu tools GENerator. - the resultant file is machine generated, cgen-ibld.in isn't - Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2005 + Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU Binutils and GDB, the GNU debugger. @@ -440,9 +440,8 @@ extract_normal (CGEN_CPU_DESC cd, word_length may be too big. */ if (cd->min_insn_bitsize < cd->base_insn_bitsize) { - if (word_offset == 0 - && word_length > total_length) - word_length = total_length; + if (word_offset + word_length > total_length) + word_length = total_length - word_offset; } /* Does the value reside in INSN_VALUE, and at the right alignment? */ diff --git a/opcodes/m32c-ibld.c b/opcodes/m32c-ibld.c index 16f0048..62c753b 100644 --- a/opcodes/m32c-ibld.c +++ b/opcodes/m32c-ibld.c @@ -3,7 +3,7 @@ THIS FILE IS MACHINE GENERATED WITH CGEN: Cpu tools GENerator. - the resultant file is machine generated, cgen-ibld.in isn't - Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2005 + Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU Binutils and GDB, the GNU debugger. @@ -440,9 +440,8 @@ extract_normal (CGEN_CPU_DESC cd, word_length may be too big. */ if (cd->min_insn_bitsize < cd->base_insn_bitsize) { - if (word_offset == 0 - && word_length > total_length) - word_length = total_length; + if (word_offset + word_length > total_length) + word_length = total_length - word_offset; } /* Does the value reside in INSN_VALUE, and at the right alignment? */ |