forked from Imagelibrary/binutils-gdb
More fixes for invalid memory accesses triggered by fuzzed binaries.
PR binutils/17531 * dwarf.c (alloc_num_debug_info_entries): New variable. (process_debug_info): Set it. Use it to avoid displaying attributes for which there is no info. (display_debug_abbrev): Check that the debug_info_entry index is valid before using it. (display_loc_list_dwo): Likewise. (process_cu_tu_index): Add range check for an overlarge dw_sect value. (free_debug_memory): Reset alloc_num_debug_info_entries. * readelf.c (slurp_ia64_unwind_table): Warn if the reloc could not be indentified. (dynamic_section_mips_val): Warn if the timestamp is invalid. (print_mips_got_entry): Add a data_end parameter. Warn if a read would go beyond the end of the data, and return an error value. (process_mips_specific): Do not read options from beyond the end of the section. Correct code to display optional data at the end of an option. Warn if there are too many GOT symbols. Update calls to print_mips_got_entry, and handle error returns.
This commit is contained in:
@@ -248,10 +248,10 @@ extern void dwarf_select_sections_by_names (const char *);
|
||||
extern void dwarf_select_sections_by_letters (const char *);
|
||||
extern void dwarf_select_sections_all (void);
|
||||
|
||||
unsigned int * find_cu_tu_set (void *, unsigned int);
|
||||
extern unsigned int * find_cu_tu_set (void *, unsigned int);
|
||||
|
||||
void * cmalloc (size_t, size_t);
|
||||
void * xcmalloc (size_t, size_t);
|
||||
void * xcrealloc (void *, size_t, size_t);
|
||||
extern void * cmalloc (size_t, size_t);
|
||||
extern void * xcmalloc (size_t, size_t);
|
||||
extern void * xcrealloc (void *, size_t, size_t);
|
||||
|
||||
extern dwarf_vma read_leb128 (unsigned char *, unsigned int *, bfd_boolean, const unsigned char * const);
|
||||
|
||||
Reference in New Issue
Block a user