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.
