On Wed, 2016-10-26 at 13:17 +0200, Mark Wielaard wrote:
There are various sanity checks that depend on knowing the file size
of the underlying ELF file which we only used when mmapping the ELF file.
Although we probably won't crash if we use pread to try to read from
the file, we still might return completely bogus data structures. This
could cause us to malloc insane amounts of memory.
Always try to get the maxsize when unknown in elf_begin.c (read_file).
Again I didn't hear back from the original reporter whether this
really solved their problem. But the change does look correct and
desirable. So I have pushed this to master now.