aggregate_size can be called recursively with the result of get_type.
get_type can return NULL when dwarf_peel_type fails. Found by afl-fuzz.
dwarf_aggregate_size when called directly doesn't need a NULL check
because it calls and checks the result of dwarf_peel_type directly.
Signed-off-by: Mark Wielaard <mark@klomp.org>
+2018-06-18 Mark Wielaard <mark@klomp.org>
+
+ * dwarf_aggregate_size.c (aggregate_size): Check die is not NULL.
+
2018-06-17 Luiz Angelo Daros de Luca <luizluca@gmail.com>
* dwarf_getsrclines.c (read_srclines): Intialize filelist early.
{
Dwarf_Attribute attr_mem;
+ if (die == NULL)
+ return -1;
+
if (INTUSE(dwarf_attr_integrate) (die, DW_AT_byte_size, &attr_mem) != NULL)
return INTUSE(dwarf_formudata) (&attr_mem, size);