libdw: Detect bad DWARF in store_implicit_value.
authorMark Wielaard <mark@klomp.org>
Fri, 8 Jun 2018 13:10:43 +0000 (15:10 +0200)
committerMark Wielaard <mark@klomp.org>
Sun, 10 Jun 2018 15:02:22 +0000 (17:02 +0200)
commitb7a5bc8aa3421cca4d343ce7e5bca9a7a704a71e
tree5b9800535fdf2d7d2e1f9e7d939b11c86bd30053
parenta1a3aa9460d2bbc5172c4eae1fd9c20b8a1a5eae
libdw: Detect bad DWARF in store_implicit_value.

The afl fuzzer running against the varlocs test detected we didn't report
the value block of a DW_OP_implicit_value consistently when the DWARF was
bad. Although this doesn't cause a crash it might result in consumers
using dwarf_getlocation_implicit_value seeing an inconsistent block length
value. To fix this detect and report bad DWARF data earlier.

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