This is the mail archive of the
elfutils-devel@sourceware.org
mailing list for the elfutils project.
Re: [PATCH] libelf: use the right size when preading in[0].sh_size
- From: Mark Wielaard <mark at klomp dot org>
- To: elfutils-devel at lists dot fedorahosted dot org
- Date: Thu, 22 Oct 2015 23:19:04 +0200
- Subject: Re: [PATCH] libelf: use the right size when preading in[0].sh_size
On Tue, Oct 20, 2015 at 04:22:08PM +0200, Jose E. Marchesi wrote:
>
> This fixes a small thinko, that was making get_shnum to return
> (size_t) -1 for all elf-64 files with e_shnum == 0.
Thanks applied.
I was wondering why we didn't notice before, but that is probably because
this only happens when the file really has zero sections, wasn't mmapped
and had different endianness on a platform that doesn't allow unaligned
access. So a combination of things that is unlikely to occur on some
popular architectures.
Cheers,
Mark