From 50a39e971efc325abcb37c3fed453eaa6fee3b2f Mon Sep 17 00:00:00 2001 From: Michael Snyder Date: Fri, 27 Jul 2007 21:23:01 +0000 Subject: [PATCH] 2007-07-27 Michael Snyder * coff-i386.c (coff_i386_rtype_to_howto): Off by one error. --- bfd/ChangeLog | 2 ++ bfd/coff-i386.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 3b4677dc617..d8d371d6a02 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,7 @@ 2007-07-27 Michael Snyder + * coff-i386.c (coff_i386_rtype_to_howto): Off by one error. + * aoutx.h (slurp_symbol_table): Return if count == 0. * coffgen.c (_bfd_coff_read_internal_relocs): Return if count is zero. diff --git a/bfd/coff-i386.c b/bfd/coff-i386.c index e5c6a6b6bd3..115fdf2fd34 100644 --- a/bfd/coff-i386.c +++ b/bfd/coff-i386.c @@ -450,7 +450,7 @@ coff_i386_rtype_to_howto (abfd, sec, rel, h, sym, addendp) { reloc_howto_type *howto; - if (rel->r_type > sizeof (howto_table) / sizeof (howto_table[0])) + if (rel->r_type >= sizeof (howto_table) / sizeof (howto_table[0])) { bfd_set_error (bfd_error_bad_value); return NULL; -- 2.30.2