diff options
author | Andrew Haley <aph@redhat.com> | 1999-10-18 12:45:21 +0000 |
---|---|---|
committer | Andrew Haley <aph@redhat.com> | 1999-10-18 12:45:21 +0000 |
commit | a67a87777490844b90870b030a0669e752427ad9 (patch) | |
tree | 1e2c563da66a7118eee3712a0cfe8b7f7e17c16a /bfd | |
parent | 68f8e33e592aaefb4c7f49483195251df7864844 (diff) | |
download | gdb-a67a87777490844b90870b030a0669e752427ad9.zip gdb-a67a87777490844b90870b030a0669e752427ad9.tar.gz gdb-a67a87777490844b90870b030a0669e752427ad9.tar.bz2 |
1999-10-15 Andrew Haley <aph@cygnus.com>
* dwarf1.c (parse_die): Fail to parse a die if its length is zero.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 4 | ||||
-rw-r--r-- | bfd/dwarf1.c | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 134f41d..640ec8d 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,7 @@ +1999-10-15 Andrew Haley <aph@cygnus.com> + + * dwarf1.c (parse_die): Fail to parse a die if its length is zero. + Sun Oct 17 17:19:00 1999 Jeffrey A Law (law@cygnus.com) * libhppa.h (bfd_hppa_insn2fmt): Change to return an int. diff --git a/bfd/dwarf1.c b/bfd/dwarf1.c index 903bfc3..da184cc 100644 --- a/bfd/dwarf1.c +++ b/bfd/dwarf1.c @@ -186,6 +186,8 @@ parse_die (abfd, aDieInfo, aDiePtr) /* First comes the length. */ aDieInfo->length = bfd_get_32 (abfd, xptr); xptr += 4; + if (aDieInfo->length == 0) + return false; if (aDieInfo->length < 6) { /* Just padding bytes. */ |