From e2fe56fdf38bb14ff7ba4beac1c474a30430871b Mon Sep 17 00:00:00 2001 From: Laszlo Kiss-Kollar Date: Wed, 29 May 2019 08:09:45 +0100 Subject: 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. --- src/patchelf.cc | 7 ------- 1 file changed, 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::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. */ -- cgit v0.12