]> andersk Git - openssh.git/blobdiff - sshd.c
- (djm) Always use saved_argv in sshd.c as compat_init_setproctitle may
[openssh.git] / sshd.c
diff --git a/sshd.c b/sshd.c
index 3f1e9ff642738bc2235c5ded0146f5ac09c76b03..eb4e4876e0b5d7074a74acda007426df484a55bd 100644 (file)
--- 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. */
This page took 0.062961 seconds and 4 git commands to generate.