mirror of
https://github.com/openharmony/third_party_elfutils.git
synced 2026-07-18 17:24:31 -04:00
1e7c230b27
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>