From: Nick Clifton Date: Fri, 25 Jan 2013 14:22:10 +0000 (+0000) Subject: * elf32-h8300.c (elf32_h8_relax_section): When checking for a X-Git-Tag: sid-snapshot-20130201~71 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d79dcc73ac46dad924acf843a2c3546517506f9e;p=thirdparty%2Fbinutils-gdb.git * elf32-h8300.c (elf32_h8_relax_section): When checking for a second reloc, make sure that the reloc potentially exists first. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 6dfcb64052c..e36a37c3e4a 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2013-01-25 Michael Schewe + + * elf32-h8300.c (elf32_h8_relax_section): When checking for a + second reloc, make sure that the reloc potentially exists first. + 2013-01-24 Nick Clifton * archures.c: Add bfd_mach_v850e3v5. diff --git a/bfd/elf32-h8300.c b/bfd/elf32-h8300.c index 388d2205c58..43ac16e551a 100644 --- a/bfd/elf32-h8300.c +++ b/bfd/elf32-h8300.c @@ -1239,7 +1239,7 @@ elf32_h8_relax_section (bfd *abfd, asection *sec, second_reloc = 1; } } - if (irel < irelend) + if (irel + 1 < irelend) { Elf_Internal_Rela *next_reloc = irel + 1; arelent bfd_reloc;