libdw, readelf, elflint: Add get_(u|s)leb128 guards
authorMark Wielaard <mark@klomp.org>
Wed, 8 Feb 2023 15:53:24 +0000 (16:53 +0100)
committerMark Wielaard <mark@klomp.org>
Tue, 14 Feb 2023 15:45:10 +0000 (16:45 +0100)
commit922068cebba6ed0dfc2da0a9e40e3e1b63e0aca9
treede05636616a8ab25c9504fca479c641490d61f22
parente444d60a341b7b9bc3ae763a843d3e7190234ca9
libdw, readelf, elflint: Add get_(u|s)leb128 guards

Add sanity check making sure an leb128 isn't being read beyond the
end of the current data segment. Most code already had these guards,
but some were missing. This makes sure an appropriate error is
generated instead.

Signed-off-by: Mark Wielaard <mark@klomp.org>
13 files changed:
libdw/ChangeLog
libdw/cfi.c
libdw/dwarf_child.c
libdw/dwarf_frame_register.c
libdw/dwarf_getabbrev.c
libdw/dwarf_getlocation.c
libdw/dwarf_getsrclines.c
libdw/encoded-value.h
libdw/fde.c
libdw/libdw_form.c
src/ChangeLog
src/elflint.c
src/readelf.c