Skip to content

Commit

Permalink
Merge pull request #86 from njsmith/master
Browse files Browse the repository at this point in the history
Fix bug in walking .gnu.version_r linked list
  • Loading branch information
edolstra committed Apr 28, 2016
2 parents 77efcf2 + abae785 commit 927b332
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/patchelf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1337,7 +1337,7 @@ void ElfFile<ElfFileParamNames>::replaceNeeded(map<string, string>& libs)
debug("keeping .gnu.version_r entry `%s'\n", file);
}
// the Elf_Verneed structures form a linked list, so jump to next entry
need = (Elf_Verneed *) (contents + rdi(shdrVersionR.sh_offset) + rdi(need->vn_next));
need = (Elf_Verneed *) (((char *) need) + rdi(need->vn_next));
--verNeedNum;
}
}
Expand Down

0 comments on commit 927b332

Please sign in to comment.