From af6914569b6ead2916c26b23deabd7458ae145ff Mon Sep 17 00:00:00 2001 From: aj Date: Mon, 21 May 2001 11:52:41 +0000 Subject: [PATCH] * dwarf2.c (decode_line_info): Fix error message. (read_abbrevs): Fix test for offset as suggested by Alan Modra and adjust error message. --- bfd/ChangeLog | 6 ++++++ bfd/dwarf2.c | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 8d236fcab6..fbadc55582 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2001-05-21 Andreas Jaeger + + * dwarf2.c (decode_line_info): Fix error message. + (read_abbrevs): Fix test for offset as suggested by Alan Modra and + adjust error message. + 2001-05-18 H.J. Lu * elflink.h (elf_link_add_object_symbols): Revert the last diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c index f364719dee..4a032732c9 100644 --- a/bfd/dwarf2.c +++ b/bfd/dwarf2.c @@ -437,9 +437,9 @@ read_abbrevs (abfd, offset, stash) return 0; } - if (offset > stash->dwarf_abbrev_size) + if (offset >= stash->dwarf_abbrev_size) { - (*_bfd_error_handler) (_("Dwarf Error: Abbrev offset (%u) bigger than abbrev size (%u)."), + (*_bfd_error_handler) (_("Dwarf Error: Abbrev offset (%u) greater than or equal to abbrev size (%u)."), offset, stash->dwarf_abbrev_size ); bfd_set_error (bfd_error_bad_value); return 0; @@ -804,7 +804,7 @@ decode_line_info (unit, stash) below. */ if (unit->line_offset >= stash->dwarf_line_size) { - (*_bfd_error_handler) (_("Dwarf Error: Line offset (%u) bigger than line size (%u)."), + (*_bfd_error_handler) (_("Dwarf Error: Line offset (%u) greater than or equal to line size (%u)."), unit->line_offset, stash->dwarf_line_size); bfd_set_error (bfd_error_bad_value); return 0; -- 2.11.0