libdw: Handle bogus CU length in dwarf_nextcu.
authorMark Wielaard <mark@klomp.org>
Wed, 20 Jun 2018 22:54:57 +0000 (00:54 +0200)
committerMark Wielaard <mark@klomp.org>
Mon, 25 Jun 2018 14:52:27 +0000 (16:52 +0200)
commite3b2060bb6a687587500c8d6c74145ef1d320c5c
treec2467298de2a7f4b7e6502cef088691f46afce1f
parentdd813335c352adb53972bdc63495650dba0c987f
libdw: Handle bogus CU length in dwarf_nextcu.

The length field could be so big that it would wrap around the next_offset.
We don't really care that length is bogus, but we don't want to use it to
calculate the next offset if it is.

Found by afl-fuzz.

Signed-off-by: Mark Wielaard <mark@klomp.org>
libdw/ChangeLog
libdw/dwarf_nextcu.c