diff options
author | Nick Clifton <nickc@redhat.com> | 2017-06-21 13:18:46 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2017-06-21 13:18:46 +0100 |
commit | 20bd1b6ba53491e4979c03a4f679d0d17b9b9046 (patch) | |
tree | 271a81c64c7389e0d669aa553a265374488dceaf /bfd/coff-sh.c | |
parent | e4da2c61669d199c75b96a1be25e13e3b8254e89 (diff) | |
download | gdb-20bd1b6ba53491e4979c03a4f679d0d17b9b9046.zip gdb-20bd1b6ba53491e4979c03a4f679d0d17b9b9046.tar.gz gdb-20bd1b6ba53491e4979c03a4f679d0d17b9b9046.tar.bz2 |
Fix seg-fault in the BFD parsing a corrupt input binary.
PR binutils/21645
* reloc.c (bfd_generic_get_relocated_section_contents): Fail if
bfd_get_full_section_contents returns no contents.
Diffstat (limited to 'bfd/coff-sh.c')
-rw-r--r-- | bfd/coff-sh.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/bfd/coff-sh.c b/bfd/coff-sh.c index dd8090c..d76f98a 100644 --- a/bfd/coff-sh.c +++ b/bfd/coff-sh.c @@ -2910,6 +2910,7 @@ sh_coff_get_relocated_section_contents (bfd *output_bfd, struct internal_reloc *internal_relocs = NULL; struct internal_syment *internal_syms = NULL; +fprintf (stderr, "DATA = %p\n", data); /* We only need to handle the case of relaxing, or of having a particular set of section contents, specially. */ if (relocatable |