This is the mail archive of the
elfutils-devel@sourceware.org
mailing list for the elfutils project.
Re: [PATCH] readelf: Calculate max_entries instead of needed bytes (and overflowing).
- From: Mark Wielaard <mark at klomp dot org>
- To: elfutils-devel at sourceware dot org
- Date: Mon, 11 Jun 2018 08:38:50 +0200
- Subject: Re: [PATCH] readelf: Calculate max_entries instead of needed bytes (and overflowing).
- References: <1528493613-23730-1-git-send-email-mark@klomp.org>
On Fri, 2018-06-08 at 23:33 +0200, Mark Wielaard wrote:
> The afl fuzzer found that we would overflow the needed bytes when
> calculating how many index entries would fit in the .debug_loclists
> and .debug_rnglists tables. To fix this just calculate the max number
> of entries. If the offset entry count is larger than that, do emit
> an error, but print up to max_entries of offsets (so the user can
> more clearly see what is wrong with their table).
Pushed to master.