From ca4cf9b9c622a5695e01f7f5815a7382a31fcf51 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Mon, 24 Jul 2017 13:49:22 +0100 Subject: Fix address violation errors parsing corrupt binary files. PR 21813 binutils* rddbg.c (read_symbol_stabs_debugging_info): Check for an empty string whilst concatenating symbol names. bfd * mach-o.c (bfd_mach_o_canonicalize_relocs): Pass the base address of the relocs to the canonicalize_one_reloc routine. * mach-o.h (struct bfd_mach_o_backend_data): Update the prototype for the _bfd_mach_o_canonicalize_one_reloc field. * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add res_base parameter. Use to check for corrupt pair relocs. * mach-o-aarch64.c (bfd_mach_o_arm64_canonicalize_one_reloc): Likewise. * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Likewise. * mach-o-x86-64.c (bfd_mach_o_x86_64_canonicalize_one_reloc): Likewise. * vms-alpha.c (_bfd_vms_slurp_eihd): Make sure that there is enough data in the record before attempting to parse it. (_bfd_vms_slurp_eeom): Likewise. (_bfd_vms_slurp_egsd): Check for an invalid section index. (image_set_ptr): Likewise. (alpha_vms_slurp_relocs): Likewise. --- bfd/mach-o.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bfd/mach-o.h') diff --git a/bfd/mach-o.h b/bfd/mach-o.h index 83660a4..0719b53 100644 --- a/bfd/mach-o.h +++ b/bfd/mach-o.h @@ -746,7 +746,7 @@ typedef struct bfd_mach_o_backend_data enum bfd_architecture arch; bfd_vma page_size; bfd_boolean (*_bfd_mach_o_canonicalize_one_reloc) - (bfd *, struct mach_o_reloc_info_external *, arelent *, asymbol **); + (bfd *, struct mach_o_reloc_info_external *, arelent *, asymbol **, arelent *); bfd_boolean (*_bfd_mach_o_swap_reloc_out)(arelent *, bfd_mach_o_reloc_info *); bfd_boolean (*_bfd_mach_o_print_thread)(bfd *, bfd_mach_o_thread_flavour *, void *, char *); -- cgit v1.1