- 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.
diff --git a/ssh-keyscan.c b/ssh-keyscan.c
index e48c086..834649f 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 <sys/queue.h>
@@ -146,7 +146,7 @@
}
static inline char *
-getline(Linebuf * lb)
+Linebuf_getline(Linebuf * lb)
{
int n = 0;
@@ -490,7 +490,7 @@
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 @@
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 @@
if (maxfd > fdlim_get(0))
fdlim_set(maxfd);
fdcon = xmalloc(maxfd * sizeof(con));
+ memset(fdcon, 0, maxfd * sizeof(con));
do {
while (ncon < maxcon) {