Skip to content

Commit

Permalink
floating point exception when packaging weird elf files
Browse files Browse the repository at this point in the history
  • Loading branch information
swills authored and bapt committed Nov 21, 2017
1 parent 49c4fb7 commit 42ff428
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libpkg/pkg_elf.c
Expand Up @@ -327,6 +327,10 @@ analyse_elf(struct pkg *pkg, const char *fpath)
case SHT_DYNAMIC:
dynamic = scn;
sh_link = shdr.sh_link;
if (shdr.sh_entsize == 0) {
ret = EPKG_END;
goto cleanup;
}
numdyn = shdr.sh_size / shdr.sh_entsize;
break;
}
Expand Down

0 comments on commit 42ff428

Please sign in to comment.