Found with afl-fuzz.
Signed-off-by: Mark Wielaard <mjw@redhat.com>
+2014-12-27 Mark Wielaard <mjw@redhat.com>
+
+ * dwarf_siblingof.c (dwarf_siblingof): Check sibling attribute offset
+ still falls inside CU data.
+
2015-01-11 Mark Wielaard <mjw@redhat.com>
* dwarf_func_inline.c (dwarf_func_inline_instances): Call
/* Something went wrong. */
return -1;
+ size_t size = sibattr.cu->endp - sibattr.cu->startp;
+ if (unlikely (offset >= size))
+ {
+ __libdw_seterrno (DWARF_E_INVALID_DWARF);
+ return -1;
+ }
+
/* Compute the next address. */
addr = sibattr.cu->startp + offset;
}