aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elf32-h8300.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 6dfcb64..e36a37c 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2013-01-25 Michael Schewe <michael.schewe@gmx.net>
+
+ * 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 <nickc@redhat.com>
* archures.c: Add bfd_mach_v850e3v5.
diff --git a/bfd/elf32-h8300.c b/bfd/elf32-h8300.c
index 388d220..43ac16e 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;