Signed-off-by: Mark Wielaard <mjw@redhat.com>
+2015-06-18 Mark Wielaard <mjw@redhat.com>
+
+ * dwfl_module_getdwarf.c (find_symtab): Check shdr is not NULL and
+ sh_entsize is not zero.
+
2015-06-06 Mark Wielaard <mjw@redhat.com>
* find-debuginfo.c (find_debuginfo_in_path): Always free localpath,
// Sanity check number of symbols.
GElf_Shdr shdr_mem, *shdr = gelf_getshdr (symscn, &shdr_mem);
- if (mod->syments > mod->symdata->d_size / shdr->sh_entsize
+ if (shdr == NULL || shdr->sh_entsize == 0
+ || mod->syments > mod->symdata->d_size / shdr->sh_entsize
|| (size_t) mod->first_global > mod->syments)
goto elferr;