readelf: Make sure print_form_data always consumes DW_FORM_strx[1234] data.
authorMark Wielaard <mark@klomp.org>
Tue, 12 Jun 2018 10:22:13 +0000 (12:22 +0200)
committerMark Wielaard <mark@klomp.org>
Sat, 16 Jun 2018 22:56:05 +0000 (00:56 +0200)
commitcfe65047ad96500a8786625ef949099ec5671774
tree7d9d8c3778881299e6a8366d5d83d8ab11300027
parent29a3395004643c4e412a47cec5de10f63c23f13c
readelf: Make sure print_form_data always consumes DW_FORM_strx[1234] data.

Found by afl-fuzz. When printing DW_FORM_strx[1234] data eu-readelf didn't
increase readp which meant eu-readelf would keep printing the same line
dirs or files encoded with strx[1234] names. This meant that for insane
large dir or file counts eu-readelf would just keep printing endlessly
because we never reached and of the .debug_line buffer.

Signed-off-by: Mark Wielaard <mark@klomp.org>
libdw/ChangeLog
libdw/memory-access.h
src/ChangeLog
src/readelf.c