Skip to content

Commit 927b332

Browse files
committed
Merge pull request #86 from njsmith/master
Fix bug in walking .gnu.version_r linked list
2 parents 77efcf2 + abae785 commit 927b332

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/patchelf.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1337,7 +1337,7 @@ void ElfFile<ElfFileParamNames>::replaceNeeded(map<string, string>& libs)
13371337
debug("keeping .gnu.version_r entry `%s'\n", file);
13381338
}
13391339
// the Elf_Verneed structures form a linked list, so jump to next entry
1340-
need = (Elf_Verneed *) (contents + rdi(shdrVersionR.sh_offset) + rdi(need->vn_next));
1340+
need = (Elf_Verneed *) (((char *) need) + rdi(need->vn_next));
13411341
--verNeedNum;
13421342
}
13431343
}

0 commit comments

Comments
 (0)