summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/ssh-keyscan.c
diff options
context:
space:
mode:
authoritojun <itojun@openbsd.org>2001-02-09 09:04:59 +0000
committeritojun <itojun@openbsd.org>2001-02-09 09:04:59 +0000
commit8b9659ff36b9fb4bdfb83c805876723ea1195879 (patch)
tree1f4f71ef163b39a99985518ea8f0c1478e092d82 /usr.bin/ssh/ssh-keyscan.c
parentAdd support for loading the bootloader and kernel from an HFS filesystem, (diff)
downloadwireguard-openbsd-8b9659ff36b9fb4bdfb83c805876723ea1195879.tar.xz
wireguard-openbsd-8b9659ff36b9fb4bdfb83c805876723ea1195879.zip
do not assume malloc() returns zero-filled region. found by malloc.conf=AJ.
Diffstat (limited to 'usr.bin/ssh/ssh-keyscan.c')
-rw-r--r--usr.bin/ssh/ssh-keyscan.c3
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) {