The readelf program assumed that it has been given a valid
ELF input file to examine, and it did not check that this
assumption was correct.
Passing a specially crafted, corrupt ELF file to readelf
could cause it to attempt to read from address 0,
resulting in readelf being terminated with a seg-fault
Patch the readelf sources to add checks on the validity
of the ELF section headers.
Readelf runs correctly, does not seg-fault and is able to
display information on the corrupt input file.