diff options
Diffstat (limited to 'crypto/openssh')
-rw-r--r-- | crypto/openssh/sshd.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/openssh/sshd.c b/crypto/openssh/sshd.c index a81e17a..bdf16d1 100644 --- a/crypto/openssh/sshd.c +++ b/crypto/openssh/sshd.c @@ -835,9 +835,10 @@ 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); + saved_argv = xmalloc(sizeof(*saved_argv) * (ac + 1)); for (i = 0; i < ac; i++) saved_argv[i] = xstrdup(av[i]); + saved_argv[ac] = NULL; #ifndef HAVE_SETPROCTITLE /* Prepare for later setproctitle emulation */ |