arlib: Check that sh_entsize isn't zero.
authorMark Wielaard <mark@klomp.org>
Thu, 18 Oct 2018 17:01:52 +0000 (19:01 +0200)
committerMark Wielaard <mark@klomp.org>
Fri, 19 Oct 2018 22:13:09 +0000 (00:13 +0200)
commit2b16a9be69939822dcafe075413468daac98b327
treef20bfa91d71a0b7bbe878d4a63e57ef4b3709385
parent4cdb0fd0d3b4255a9994ce302d6df76d251f7b75
arlib: Check that sh_entsize isn't zero.

A bogus ELF file could have sh_entsize as zero. Don't divide by zero,
but just assume there are no symbols in the section.

https://sourceware.org/bugzilla/show_bug.cgi?id=23786

Signed-off-by: Mark Wielaard <mark@klomp.org>
src/ChangeLog
src/arlib.c