diff --git a/src/elf.c b/src/elf.c index fe136d0..700c391 100644 --- a/src/elf.c +++ b/src/elf.c @@ -115,7 +115,7 @@ static int elf_sym_iter_new(struct elf_sym_iter *iter, return -ENOENT; } - if (!gelf_getshdr(scn, &sh)) + if (!gelf_getshdr(scn, &sh) || !sh.sh_entsize) return -EINVAL; iter->strtabidx = sh.sh_link;