libdw: Report error in dwarf_getlocation_die for bogus opcode offset.
authorMark Wielaard <mark@klomp.org>
Wed, 6 Jun 2018 21:51:12 +0000 (23:51 +0200)
committerMark Wielaard <mark@klomp.org>
Fri, 8 Jun 2018 10:03:14 +0000 (12:03 +0200)
commit64024753424afcd263f5022446be15a920161bd0
tree85ea3216cb6791fc401e5bd3fe6a3c397abe8454
parent07d2098890e9113079bae64f6fc7f4069f7b12cd
libdw: Report error in dwarf_getlocation_die for bogus opcode offset.

Found by afl fuzzer on varlocs test. varlocs sanity checks that the
given offset in the opcode corresponds to the cuoffset of the returned
DIE. In case the opcode offset was bogus this might fail because we
might wrap around and return a random DIE instead of reporting an error.

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