summaryrefslogtreecommitdiff
path: root/sshd.c
diff options
context:
space:
mode:
Diffstat (limited to 'sshd.c')
-rw-r--r--sshd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sshd.c b/sshd.c
index cb70fa0c6..c0221bea7 100644
--- a/sshd.c
+++ b/sshd.c
@@ -830,9 +830,10 @@ main(int ac, char **av)
830 /* Save argv. Duplicate so setproctitle emulation doesn't clobber it */ 830 /* Save argv. Duplicate so setproctitle emulation doesn't clobber it */
831 saved_argc = ac; 831 saved_argc = ac;
832 saved_argv = av; 832 saved_argv = av;
833 saved_argv = xmalloc(sizeof(*saved_argv) * ac); 833 saved_argv = xmalloc(sizeof(*saved_argv) * (ac + 1));
834 for (i = 0; i < ac; i++) 834 for (i = 0; i < ac; i++)
835 saved_argv[i] = xstrdup(av[i]); 835 saved_argv[i] = xstrdup(av[i]);
836 saved_argv[i] = NULL;
836 837
837#ifndef HAVE_SETPROCTITLE 838#ifndef HAVE_SETPROCTITLE
838 /* Prepare for later setproctitle emulation */ 839 /* Prepare for later setproctitle emulation */