summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaszlo Kiss-Kollar <kiss.kollar.laszlo@gmail.com>2019-05-29 07:09:45 (GMT)
committerLaszlo Kiss-Kollar <kiss.kollar.laszlo@gmail.com>2019-05-29 07:09:45 (GMT)
commite2fe56fdf38bb14ff7ba4beac1c474a30430871b (patch)
tree3638ae7976a16ee61ebb0658e47645bb19ee7ea2
parentdf5538a2d8ac1e434d9f30e7f9d3ad3a691f5a9c (diff)
downloadpatchelf-e2fe56fdf38bb14ff7ba4beac1c474a30430871b.zip
patchelf-e2fe56fdf38bb14ff7ba4beac1c474a30430871b.tar.gz
patchelf-e2fe56fdf38bb14ff7ba4beac1c474a30430871b.tar.bz2
Remove zeroing out logic in modifySoname
The original SONAME is filled with 'X' characters in the modifySoname function. This can cause issues if the .dynstr entry is still referenced in other sections, e.g. some libraries use the SONAME entry as version specifiers.
-rw-r--r--src/patchelf.cc7
1 files changed, 0 insertions, 7 deletions
diff --git a/src/patchelf.cc b/src/patchelf.cc
index 0b4965a..592799d 100644
--- a/src/patchelf.cc
+++ b/src/patchelf.cc
@@ -1074,13 +1074,6 @@ void ElfFile<ElfFileParamNames>::modifySoname(sonameMode op, const std::string &
return;
}
- /* Zero out the previous SONAME */
- unsigned int sonameSize = 0;
- if (soname) {
- sonameSize = strlen(soname);
- memset(soname, 'X', sonameSize);
- }
-
debug("new SONAME is '%s'\n", newSoname.c_str());
/* Grow the .dynstr section to make room for the new SONAME. */