aboutsummaryrefslogtreecommitdiff
path: root/bfd/peXXigen.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2015-02-26 21:32:04 +0000
committerNick Clifton <nickc@redhat.com>2015-02-26 21:32:04 +0000
commitc86934ceee0971a04bbfc145c7b9a53357c25c91 (patch)
tree3507e8637f28e853d3f611db5a83fd03c9f33866 /bfd/peXXigen.c
parent9beb7c4e1d403e1374096df3a16607132a8cfe84 (diff)
downloadgdb-c86934ceee0971a04bbfc145c7b9a53357c25c91.zip
gdb-c86934ceee0971a04bbfc145c7b9a53357c25c91.tar.gz
gdb-c86934ceee0971a04bbfc145c7b9a53357c25c91.tar.bz2
Fixes illegal memory access errors and arithmetic overflows when running strip on fuzzed binaries.
PR binutils/17512 * coffcode.h (coff_compute_section_file_positions): Report negative page sizes. * elf.c (elf_fake_sections): Handle excessive alignmment powers. (assign_file_positions_for_non_load_sections): Replace assertion with an error message. (rewrite_elf_program_header): Handle excessive segment alignments. * mach-o.c (bfd_mach_o_read_section_32): Likewise. (bfd_mach_o_read_section_64): Likewise. * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Use %B to print a bfd name, not %A.
Diffstat (limited to 'bfd/peXXigen.c')
-rw-r--r--bfd/peXXigen.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bfd/peXXigen.c b/bfd/peXXigen.c
index c13c3ff..6aa18ca 100644
--- a/bfd/peXXigen.c
+++ b/bfd/peXXigen.c
@@ -2955,7 +2955,7 @@ _bfd_XX_bfd_copy_private_bfd_data_common (bfd * ibfd, bfd * obfd)
if (ope->pe_opthdr.DataDirectory[PE_DEBUG_DATA].Size + (addr - section->vma)
> bfd_get_section_size (section))
{
- _bfd_error_handler (_("%A: Data Directory size (%lx) exceeds space left in section (%lx)"),
+ _bfd_error_handler (_("%B: Data Directory size (%lx) exceeds space left in section (%lx)"),
obfd, ope->pe_opthdr.DataDirectory[PE_DEBUG_DATA].Size,
bfd_get_section_size (section) - (addr - section->vma));
return FALSE;
@@ -2991,7 +2991,7 @@ _bfd_XX_bfd_copy_private_bfd_data_common (bfd * ibfd, bfd * obfd)
}
else if (section)
{
- _bfd_error_handler (_("%A: Failed to read debug data section"), obfd);
+ _bfd_error_handler (_("%B: Failed to read debug data section"), obfd);
return FALSE;
}
}