mirror of
https://github.com/NixOS/patchelf.git
synced 2025-10-19 02:23:15 +08:00
Merge pull request #376 from ehmry/null-rpath
modifyRPath: return early if new and old rpath are empty
This commit is contained in:
@@ -1350,8 +1350,8 @@ void ElfFile<ElfFileParamNames>::modifyRPath(RPathOp op,
|
|||||||
debug("new rpath is '%s'\n", newRPath.c_str());
|
debug("new rpath is '%s'\n", newRPath.c_str());
|
||||||
|
|
||||||
|
|
||||||
if (rpath && newRPath.size() <= rpathSize) {
|
if (newRPath.size() <= rpathSize) {
|
||||||
memcpy(rpath, newRPath.c_str(), newRPath.size() + 1);
|
if (rpath) memcpy(rpath, newRPath.c_str(), newRPath.size() + 1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user