This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] libelf: If e_phnum is zero then set e_phoff also to zero.


On Wed, 2015-05-13 at 15:25 +0200, Mark Wielaard wrote:
> If phnum is zero make sure e_phoff is also zero and not some random value.
> That would cause trouble in update_file. This could happen when ELF_F_LAYOUT
> is set and the user copied over a ehdr from a bogus ELF file where the phdrs
> are unreadable. In that case trying to write out the new ELF image would
> crash trying to follow the bogus e_phdr value.

Pushed to master.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]