diff options
author | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2001-02-09 09:05:00 +0000 |
---|---|---|
committer | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2001-02-09 09:05:00 +0000 |
commit | 8bc44ed5a50cc5cab29281d7142a2198f64f4874 (patch) | |
tree | 20f0ff2458046235e48239f1e97bdfe84617df7e | |
parent | 19fdfbe3abfa984e0b2feecbe66c7ab10b1fdfdf (diff) |
do not assume malloc() returns zero-filled region. found by malloc.conf=AJ.
-rw-r--r-- | usr.bin/ssh/ssh-keyscan.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/ssh/ssh-keyscan.c b/usr.bin/ssh/ssh-keyscan.c index bb482ffda22..78dd344f458 100644 --- a/usr.bin/ssh/ssh-keyscan.c +++ b/usr.bin/ssh/ssh-keyscan.c @@ -8,7 +8,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: ssh-keyscan.c,v 1.14 2001/02/07 22:43:16 markus Exp $"); +RCSID("$OpenBSD: ssh-keyscan.c,v 1.15 2001/02/09 09:04:59 itojun Exp $"); #include <sys/queue.h> #include <errno.h> @@ -578,6 +578,7 @@ main(int argc, char **argv) if (maxfd > fdlim_get(0)) fdlim_set(maxfd); fdcon = xmalloc(maxfd * sizeof(con)); + memset(fdcon, 0, maxfd * sizeof(con)); do { while (ncon < maxcon) { |