We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0121f5e commit 3fc63c9Copy full SHA for 3fc63c9
src/patchelf.cc
@@ -1457,7 +1457,7 @@ void ElfFile<ElfFileParamNames>::modifyRPath(RPathOp op,
1457
1458
/* Zero out the previous rpath to prevent retained dependencies in
1459
Nix. */
1460
- unsigned int rpathSize = 0;
+ size_t rpathSize = 0;
1461
if (rpath) {
1462
rpathSize = strlen(rpath);
1463
memset(rpath, 'X', rpathSize);
@@ -1467,7 +1467,7 @@ void ElfFile<ElfFileParamNames>::modifyRPath(RPathOp op,
1467
1468
1469
if (newRPath.size() <= rpathSize) {
1470
- strcpy(rpath, newRPath.c_str());
+ memcpy(rpath, newRPath.c_str(), newRPath.size() + 1);
1471
return;
1472
}
1473
0 commit comments