commit | 1e7c230b277b6eb82577a3bc4b56ca291c28964d | [log] [tgz] |
---|---|---|
author | Mark Wielaard <mark@klomp.org> | Fri Oct 19 15:01:29 2018 +0200 |
committer | Mark Wielaard <mark@klomp.org> | Sat Oct 20 00:13:10 2018 +0200 |
tree | c49c147eef876edee8ef5fd4592a104f2bfa286e | |
parent | 22d2d082d57a7470fadc0eae67179553f4919209 [diff] |
Check sh_entsize is not zero. There were some recent bug reports where we trusted the ELF section header to be sane and divided the sh_size by the sh_entsize to get the number of objects in the section. This would cause a divide by zero if the file was corrupt and the sh_entsize was zero. Add checks for any such code. Signed-off-by: Mark Wielaard <mark@klomp.org>