libdw: Break dwarf_aggregate_size recursion because of type cycles.

Found by afl-fuzz. An array type (indirectly) referring to itself in the
DIE tree could blow up the stack when dwarf_aggregate_size was called.
Limit the recursion depth to MAX_DEPTH (256) entries.

Signed-off-by: Mark Wielaard <mark@klomp.org>
2 files changed