findtextrel: Check that sh_entsize isn't zero.
authorMark Wielaard <mark@klomp.org>
Sun, 14 Oct 2018 14:58:51 +0000 (16:58 +0200)
committerMark Wielaard <mark@klomp.org>
Fri, 19 Oct 2018 22:13:09 +0000 (00:13 +0200)
commit577511f66842c324c811d1530eea32792f2bee29
tree129644b6fe00b5ed708278b49e5aaee36476d9ac
parent20f9de9b5f704cec55df92406a50bcbcfca96acd
findtextrel: 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 entries in the section.

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

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