From c791bebc2a0e15af332151502ca56c4d7f15ebc1 Mon Sep 17 00:00:00 2001 From: Ben Lindstrom Date: Sat, 10 Feb 2001 23:18:11 +0000 Subject: - itojun@cvs.openbsd.org 2001/02/07 18:04:50 [ssh-keyscan.c] fix size_t -> int cast (use u_long). markus ok - markus@cvs.openbsd.org 2001/02/07 22:43:16 [ssh-keyscan.c] s/getline/Linebuf_getline/; from roumen.petrov@skalasoft.com - itojun@cvs.openbsd.org 2001/02/09 9:04:59 [ssh-keyscan.c] do not assume malloc() returns zero-filled region. found by malloc.conf=AJ. --- ChangeLog | 12 +++++++++++- ssh-keyscan.c | 9 +++++---- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9e64a40f0..61801f399 100644 --- a/ChangeLog +++ b/ChangeLog @@ -63,6 +63,16 @@ - more strict prototypes, include necessary headers - use paths.h/pathnames.h decls - size_t typecase to int -> u_long + - itojun@cvs.openbsd.org 2001/02/07 18:04:50 + [ssh-keyscan.c] + fix size_t -> int cast (use u_long). markus ok + - markus@cvs.openbsd.org 2001/02/07 22:43:16 + [ssh-keyscan.c] + s/getline/Linebuf_getline/; from roumen.petrov@skalasoft.com + - itojun@cvs.openbsd.org 2001/02/09 9:04:59 + [ssh-keyscan.c] + do not assume malloc() returns zero-filled region. found by + malloc.conf=AJ. - (bal) fixed sftp-client.c. Return 'status' instead of '0' (from the OpenBSD tree) - (bal) Synced ssh.1, ssh-add.1 and sshd.8 w/ OpenBSD @@ -3850,4 +3860,4 @@ - Wrote replacements for strlcpy and mkdtemp - Released 1.0pre1 -$Id: ChangeLog,v 1.731 2001/02/10 23:13:41 mouring Exp $ +$Id: ChangeLog,v 1.732 2001/02/10 23:18:11 mouring Exp $ diff --git a/ssh-keyscan.c b/ssh-keyscan.c index e48c0865e..834649fef 100644 --- a/ssh-keyscan.c +++ b/ssh-keyscan.c @@ -8,7 +8,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: ssh-keyscan.c,v 1.12 2001/02/04 15:32:26 stevesk Exp $"); +RCSID("$OpenBSD: ssh-keyscan.c,v 1.15 2001/02/09 09:04:59 itojun Exp $"); #if defined(HAVE_SYS_QUEUE_H) && !defined(HAVE_BOGUS_SYS_QUEUE_H) #include @@ -146,7 +146,7 @@ Linebuf_lineno(Linebuf * lb) } static inline char * -getline(Linebuf * lb) +Linebuf_getline(Linebuf * lb) { int n = 0; @@ -490,7 +490,7 @@ conloop(void) seltime = c->c_tv; seltime.tv_sec -= now.tv_sec; seltime.tv_usec -= now.tv_usec; - if ((int) seltime.tv_usec < 0) { + if (seltime.tv_usec < 0) { seltime.tv_usec += 1000000; seltime.tv_sec--; } @@ -547,7 +547,7 @@ nexthost(int argc, char **argv) error("ignoring invalid/misplaced option `%s'", argv[argno++]); } else { char *line; - line = getline(lb); + line = Linebuf_getline(lb); if (line) return (line); Linebuf_free(lb); @@ -599,6 +599,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) { -- cgit v1.2.3