opnsense-src/usr.bin/elfdump
Eric van Gyzen 86e5e10daf elfdump: handle small files more gracefully
elfdump -E on an empty file would complain "Invalid argument" because
it tried to mmap zero bytes.  With the -E flag, elfdump should
simply exit non-zero.  For tiny files, the code would reference off
the end of the mapped region.

Ensure the file is large enough to contain an ELF header before mapping it.

MFC after:	1 week
Sponsored by:	Dell EMC Isilon
2022-02-17 10:09:53 -06:00
..
elfdump.1 elfdump: Add -E to test if a file is an ELF binary. 2018-11-05 22:53:50 +00:00
elfdump.c elfdump: handle small files more gracefully 2022-02-17 10:09:53 -06:00
Makefile Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
Makefile.depend DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00