This patch ensure that e_shentsize (sections header's size in bytes) is
authorsemarie <semarie@openbsd.org>
Tue, 23 Jun 2015 15:13:29 +0000 (15:13 +0000)
committersemarie <semarie@openbsd.org>
Tue, 23 Jun 2015 15:13:29 +0000 (15:13 +0000)
commit8e73cb8c2437f776da5b34c93cc8a38495fb4cdc
treefdd4c98b9c2ecb0ac2a7db90c7a789cb9b0eb617
parent061050452b76d85dae66ae410e5f2186ce0b6eca
This patch ensure that e_shentsize (sections header's size in bytes) is
big enough to fill at least one Elf_Shdr.

While here, inverts calloc() arguments to be calloc(nmemb, size),
according to fread() call after.

This problem was found with afl, with e_shentsize=1.

ok miod@
usr.bin/nm/elf.c