diff options
author | Darren Tucker <dtucker@zip.com.au> | 2006-05-04 16:24:34 +1000 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2006-05-04 16:24:34 +1000 |
commit | d8093e49bf06813a8c97cbc90810f4863388af77 (patch) | |
tree | 186c431180b5e63c14733c5d92a5cdb988426fca /ssh-rand-helper.c | |
parent | 596d33801f6d703c1e45c74df6f6d6fe7ee085bb (diff) |
- (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 'ssh-rand-helper.c')
-rw-r--r-- | ssh-rand-helper.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/ssh-rand-helper.c b/ssh-rand-helper.c index 662f70080..3a4a165fa 100644 --- a/ssh-rand-helper.c +++ b/ssh-rand-helper.c | |||
@@ -674,8 +674,7 @@ prng_read_commands(char *cmdfilename) | |||
674 | } | 674 | } |
675 | 675 | ||
676 | num_cmds = 64; | 676 | num_cmds = 64; |
677 | entcmd = xmalloc(num_cmds * sizeof(entropy_cmd_t)); | 677 | entcmd = xcalloc(num_cmds, sizeof(entropy_cmd_t)); |
678 | memset(entcmd, '\0', num_cmds * sizeof(entropy_cmd_t)); | ||
679 | 678 | ||
680 | /* Read in file */ | 679 | /* Read in file */ |
681 | cur_cmd = linenum = 0; | 680 | cur_cmd = linenum = 0; |