summaryrefslogtreecommitdiff
path: root/sshd.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2003-06-02 12:15:54 +1000
committerDamien Miller <djm@mindrot.org>2003-06-02 12:15:54 +1000
commitf2e3e9deba2de12a01de9cf74befb6e94a3781d2 (patch)
tree85283bfed3c9258536506c355907f0dae59fc37d /sshd.c
parentf3bff949576dbc207f958b38f56ed6df686a5e0c (diff)
downloadopenssh-git-f2e3e9deba2de12a01de9cf74befb6e94a3781d2.tar.gz
- (djm) Always use saved_argv in sshd.c as compat_init_setproctitle may
clobber
Diffstat (limited to 'sshd.c')
-rw-r--r--sshd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sshd.c b/sshd.c
index 3f1e9ff6..eb4e4876 100644
--- a/sshd.c
+++ b/sshd.c
@@ -825,7 +825,6 @@ main(int ac, char **av)
/* Save argv. Duplicate so setproctitle emulation doesn't clobber it */
saved_argc = ac;
- saved_argv = av;
saved_argv = xmalloc(sizeof(*saved_argv) * (ac + 1));
for (i = 0; i < ac; i++)
saved_argv[i] = xstrdup(av[i]);
@@ -834,6 +833,7 @@ main(int ac, char **av)
#ifndef HAVE_SETPROCTITLE
/* Prepare for later setproctitle emulation */
compat_init_setproctitle(ac, av);
+ av = saved_argv;
#endif
/* Initialize configuration options to their default values. */