<pre style='margin:0'>
Joshua Root (jmroot) pushed a commit to branch master
in repository macports-base.
</pre>
<p><a href="https://github.com/macports/macports-base/commit/4275d4c99c1b1008d9bd6529bc552830f95c41c2">https://github.com/macports/macports-base/commit/4275d4c99c1b1008d9bd6529bc552830f95c41c2</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 4275d4c99c1b1008d9bd6529bc552830f95c41c2
</span>Author: Ryan Carsten Schmidt <git@ryandesign.com>
AuthorDate: Wed Sep 25 02:50:24 2024 -0500
<span style='display:block; white-space:pre;color:#404040;'> cp: Use execv instead of execve
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> See: https://trac.macports.org/ticket/70897
</span>---
src/programs/cp/cp.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/programs/cp/cp.c b/src/programs/cp/cp.c
</span><span style='display:block; white-space:pre;color:#808080;'>index 24c9703ef..f6b74491e 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/programs/cp/cp.c
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/programs/cp/cp.c
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -5,8 +5,6 @@
</span> #include <unistd.h>
#include <sys/errno.h>
<span style='display:block; white-space:pre;background:#ffe0e0;'>-extern char **environ;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span> int main(int argc, char *argv[])
{
const char *cp_path = "/bin/cp";
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -18,7 +16,7 @@ int main(int argc, char *argv[])
</span> for (int i = 1; i < argc; i++) {
new_argv[i+1] = argv[i];
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- execve(cp_path, new_argv, environ);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ execv(cp_path, new_argv);
</span> }
/* something failed */
perror("cp");
</pre><pre style='margin:0'>
</pre>