aboutsummaryrefslogtreecommitdiff
path: root/binutils/elfcomm.c
AgeCommit message (Collapse)AuthorFilesLines
2015-01-02ChangeLog rotatation and copyright year updateAlan Modra1-1/+1
2014-12-22More fixes for invalid memory accesses exposed by fuzzed binaries.Nick Clifton1-0/+10
PR binutils/17531 * dwarf.c (decode_location_expression): Check for an out of range value for a DW_OP_GNU_entry_value expression. (display_debug_lines_raw): Check for a partial .debug_line. section being encountered without a prior, full .debug.line section. (display_debug_lines_decoded): Likewise. Also check for li_line_range being zero. (display_debug_pubnames_worker): Check for an invalid pn_length field. (read_cie): Add range checks. * elfcomm.c (setup_archive): Check for a negative longnames_size.
2014-12-08More fixes for invalid memory accesses triggered by fuzzed binaries.Nick Clifton1-2/+4
PR binutils/17531 * dwarf.c (display_debug_frames): Check for a negative augmentation data length. (display_gdb_index): Check for invalid offsets. * elfcomm.c (process_archive_index_and_symbols): Check for an index number that overflows when multiplied by the ar index size. * readelf.c (dump_ia64_unwind): Add range checks. (slurp_ia64_unwind_table): Change to a boolean function. Add range checks. (process_version_sections): Add range checks. (get_symbol_version_string): Add check for missing section headers.
2014-12-01Add checks for memory access violations exposed by fuzzed archives.Nick Clifton1-5/+50
PR binutils/17531 * dwarf.c (process_cu_tu_index): Check for an out of range row index. * elfcomm.c (adjust_relative_path): Change name_len parameter to an unsigned long. Check for path length overflow. (process_archive_index_and_symbols): Check for invalid header size. (setup_archive): Add checks for invalid archives. (get_archive_member_name): Add range checks. * elfcomm.h (adjust_relative_path): Update prototyoe. * readelf.c (process_archive): Add range checks.
2014-03-05Update copyright yearsAlan Modra1-1/+1
2013-05-15binutils/Cary Coutant1-1/+118
* dwarf.c (SAFE_BYTE_GET64): Correct end-of-buffer check; don't increment PTR. (decode_location_expression): DW_OP_const2u should read 2 bytes. (display_debug_lines_decoded): Adjust formatting. * elfcomm.c (byte_get_little_endian): Add cases for 5-, 6-, and 7-byte reads. (byte_get_big_endian): Likewise. (byte_get_signed): Likewise.
2013-03-04 * elfcomm.c (error): Flush stdout before emitting the errorNick Clifton1-0/+6
message. (warn): Likewise.
2013-02-15 PR binutils/15140Nick Clifton1-7/+21
* ar.c (open_inarch): Fail on attempts to convert a normal archive to a thin archive or vice versa. * elfcomm.c (make_qualified_name): Handle corrupted thin archives. * readelf.c (process_archive): Likewise. * doc/binutils.texi: Clarify documentation describing thin archives. * archive.c (_bfd_get_elt_at_filepos): Prevent an infinite loop accessing a corrupt nested archive.
2013-02-07 * elfcomm.c (get_archive_member_name): Prevent seg-fault if aNick Clifton1-0/+6
corrupt archive uses long names but has no long name table.
2012-07-17 * elfcomm.c (setup_archive): Extract index table and symbol tableNick Clifton1-118/+151
scanning code into... (process_archive_index_and_symbols): ... this function and add support for 64-bit index tables. * elfcomm.h (struct archive_info): Change type of index_num and index_array to elf_vma. Add 'uses_64bit_indicies' field. * readelf.c (process_archive): Fix support for 64-bit indicies.
2012-02-15 * dwarf.c (dwarf_vmatoa64): New function.Cary Coutant1-0/+19
(read_and_display_attr_value): Print 8-byte forms as single hex numbers. (process_debug_info): Print type signatures as single hex numbers. * elfcomm.c (byte_get_64): New function. * elfcomm.h (byte_get_64): New function.
2010-11-21Add and use elfcomm.c/elfcomm.h.H.J. Lu1-0/+658
2010-11-21 H.J. Lu <hongjiu.lu@intel.com> PR binutils/12235 * elfcomm.c: New. * elfcomm.h: Likewise. * Makefile.am (HFILES): Add elfcomm.h. (CFILES): Add elfcomm.c. (ELFLIBS): New. (readelf_SOURCES): Add $(ELFLIBS). (elfedit_SOURCES): Likewise. (objdump_SOURCES): Likewise. * Makefile.in: Regenerated. * dwarf.c: Include "elfcomm.h". (byte_get): Removed. (byte_get_little_endian): Likewise. (byte_get_big_endian): Likewise. (byte_get_signed): Likewise. (error): Likewise. (warn): Likewise. * dwarf.h (dwarf_vma): Defined with HOST_WIDEST_INT. (dwarf_size_type): Likewise. (byte_get): Removed. (byte_get_signed): Likewise. (byte_get_little_endian): Likewise. (byte_get_big_endian): Likewise. (error): Likewise. (warn): Likewise. * elfedit.c: Include "elfcomm.h". Don't include "aout/ar.h". Call error () instead of non_fatal (). (streq): Removed. (strneq): Likewise. (const_strneq): Likewise. (non_fatal): Likewise. (BYTE_GET): Likewise. (BYTE_PUT): Likewise. (byte_get): Likewise. (byte_put): Likewise. (byte_get_little_endian): Likewise. (byte_get_big_endian): Likewise. (byte_put_little_endian): Likewise. (byte_put_big_endian): Likewise. (adjust_relative_path): Likewise. (archive_info): Likewise. (setup_archive): Likewise. (release_archive): Likewise. (setup_nested_archive): Likewise. (get_archive_member_name): Likewise. (get_archive_member_name_at): Likewise. (make_qualified_name): Likewise. * objdump.c: Include "elfcomm.h". * readelf.c: Include "elfcomm.h". Don't include "aout/ar.h". (BYTE_GET): Removed. (BYTE_GET_SIGNED): Removed. (streq): Likewise. (strneq): Likewise. (const_strneq): Likewise. (byte_put): Likewise. (byte_put_little_endian): Likewise. (byte_put_big_endian): Likewise. (adjust_relative_path): Likewise. (archive_info): Likewise. (setup_archive): Likewise. (release_archive): Likewise. (setup_nested_archive): Likewise. (get_archive_member_name): Likewise. (get_archive_member_name_at): Likewise. (make_qualified_name): Likewise.