Found with afl-fuzz.
Signed-off-by: Mark Wielaard <mjw@redhat.com>
+2014-12-30 Mark Wielaard <mjw@redhat.com>
+
+ * ppc_symbol.c (find_dyn_got): Check sh_entsize is not zero.
+
2014-12-18 Ulrich Drepper <drepper@gmail.com>
* Makefile.am: Suppress output of textrel_check command.
GElf_Shdr shdr_mem;
GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem);
Elf_Data *data = elf_getdata (scn, NULL);
- if (shdr != NULL && shdr->sh_type == SHT_DYNAMIC && data != NULL)
+ if (shdr != NULL && shdr->sh_type == SHT_DYNAMIC && data != NULL
+ && shdr->sh_entsize != 0)
for (unsigned int j = 0; j < shdr->sh_size / shdr->sh_entsize; ++j)
{
GElf_Dyn dyn_mem;