aboutsummaryrefslogtreecommitdiff
path: root/binutils/dwarf.h
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2015-01-05 13:54:22 +0000
committerNick Clifton <nickc@redhat.com>2015-01-05 13:54:22 +0000
commit82b1b41bcdc6d01fdbd94b246e24a8a8f8c2bddd (patch)
tree757eaffeeb7a220f257326d6d7e366d0713187be /binutils/dwarf.h
parentc1724c7fd39d85ccc1f94a0cd7bc25b19aa43ffd (diff)
downloadgdb-82b1b41bcdc6d01fdbd94b246e24a8a8f8c2bddd.zip
gdb-82b1b41bcdc6d01fdbd94b246e24a8a8f8c2bddd.tar.gz
gdb-82b1b41bcdc6d01fdbd94b246e24a8a8f8c2bddd.tar.bz2
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.
Diffstat (limited to 'binutils/dwarf.h')
-rw-r--r--binutils/dwarf.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/binutils/dwarf.h b/binutils/dwarf.h
index d43f096..e8a768e 100644
--- a/binutils/dwarf.h
+++ b/binutils/dwarf.h
@@ -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);