diff options
author | Nick Clifton <nickc@redhat.com> | 2015-01-12 16:08:41 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2015-01-12 16:08:41 +0000 |
commit | 72c61a0d1ef445f99305859b66450da60ec6e0cb (patch) | |
tree | dfe02ba917560930a9ee5567b15b63e324913d38 /binutils/dwarf.h | |
parent | 696025802ec3273fde5cbf82c215a3d795435c1a (diff) | |
download | gdb-72c61a0d1ef445f99305859b66450da60ec6e0cb.zip gdb-72c61a0d1ef445f99305859b66450da60ec6e0cb.tar.gz gdb-72c61a0d1ef445f99305859b66450da60ec6e0cb.tar.bz2 |
More fixes for memory access errors when running readelf on fuzzed binaries.
PR binutils/17531
* dwarf.c (process_debug_info): Check for abbrev_base being larger
than the section size.
(process_cu_tu_index): Use xcalloc2 to allocate the CU and TU
arrays.
(xcalloc2): New function. Like xcalloc, but checks for overflow.
* dwarf.h (xcalloc2): Prototype.
Diffstat (limited to 'binutils/dwarf.h')
-rw-r--r-- | binutils/dwarf.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/binutils/dwarf.h b/binutils/dwarf.h index e8a768e..54dcbc7 100644 --- a/binutils/dwarf.h +++ b/binutils/dwarf.h @@ -251,6 +251,7 @@ extern void dwarf_select_sections_all (void); extern unsigned int * find_cu_tu_set (void *, unsigned int); extern void * cmalloc (size_t, size_t); +extern void * xcalloc2 (size_t, size_t); extern void * xcmalloc (size_t, size_t); extern void * xcrealloc (void *, size_t, size_t); |