summaryrefslogtreecommitdiffstats
path: root/sshd.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2006-05-04 08:24:34 +0200
committerDarren Tucker <dtucker@zip.com.au>2006-05-04 08:24:34 +0200
commitd8093e49bf06813a8c97cbc90810f4863388af77 (patch)
tree186c431180b5e63c14733c5d92a5cdb988426fca /sshd.c
parent - (dtucker) [packet.c] Remove in_systm.h since it's also in includes.h (diff)
downloadopenssh-d8093e49bf06813a8c97cbc90810f4863388af77.tar.xz
openssh-d8093e49bf06813a8c97cbc90810f4863388af77.zip
- (dtucker) [auth-pam.c groupaccess.c monitor.c monitor_wrap.c scard-opensc.c
session.c ssh-rand-helper.c sshd.c openbsd-compat/bsd-cygwin_util.c openbsd-compat/setproctitle.c] Convert malloc(foo*bar) -> calloc(foo,bar) in Portable-only code; since calloc zeros, remove now-redundant memsets. Also add a couple of sanity checks. With & ok djm@
Diffstat (limited to '')
-rw-r--r--sshd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sshd.c b/sshd.c
index a206db245..e707cf654 100644
--- a/sshd.c
+++ b/sshd.c
@@ -921,7 +921,7 @@ main(int ac, char **av)
/* Save argv. Duplicate so setproctitle emulation doesn't clobber it */
saved_argc = ac;
rexec_argc = ac;
- saved_argv = xmalloc(sizeof(*saved_argv) * (ac + 1));
+ saved_argv = xcalloc(ac + 1, sizeof(*saved_argv));
for (i = 0; i < ac; i++)
saved_argv[i] = xstrdup(av[i]);
saved_argv[i] = NULL;