projects
/
oweals
/
procd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
54b46a3
)
utrace: Fix environment initialization
author
Michal Sojka
<sojkam1@fel.cvut.cz>
Tue, 12 Sep 2017 11:12:33 +0000
(13:12 +0200)
committer
John Crispin
<john@phrozen.org>
Thu, 28 Sep 2017 06:26:56 +0000
(08:26 +0200)
We want to copy the existing environment instead of the new one to
itself. Other bugs in this code are fixed in the next commit.
Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz>
trace/trace.c
patch
|
blob
|
history
diff --git
a/trace/trace.c
b/trace/trace.c
index fdffaba5f7cdb9d1e25ef3161bdd818d9c248391..04bf7a55c8a8605cb955e2dfd93cc3d33e5849bd 100644
(file)
--- a/
trace/trace.c
+++ b/
trace/trace.c
@@
-186,7
+186,7
@@
int main(int argc, char **argv, char **envp)
;
_envp = calloc(envc, sizeof(char *));
- memcpy(&_envp[1],
_
envp, envc * sizeof(char *));
+ memcpy(&_envp[1], envp, envc * sizeof(char *));
*_envp = preload;
ret = execve(_argv[0], _argv, _envp);