Skip to content

Commit

Permalink
Fix #8764 differently since ptr diff might not fit in ptrdiff_t
Browse files Browse the repository at this point in the history
  • Loading branch information
kazarmy committed Oct 31, 2017
1 parent 675b582 commit d21e91f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libr/bin/format/elf/elf.c
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,7 @@ static Sdb *store_versioninfo_gnu_verdef(ELFOBJ *bin, Elf_(Shdr) *shdr, int sz)
verdef->vd_aux = READ32 (dfs, j)
verdef->vd_next = READ32 (dfs, j)
int vdaux = verdef->vd_aux;
if (vdaux < 1 || (char *)UINTPTR_MAX - vstart < vdaux) {
if (vdaux < 1 || vstart + vdaux < vstart) {
sdb_free (sdb_verdef);
goto out_error;
}
Expand Down

0 comments on commit d21e91f

Please sign in to comment.