From 452439db16f5dffa751f705bd94beb070e986151 Mon Sep 17 00:00:00 2001 From: Dan Harnett Date: Mon, 27 Aug 2001 22:02:14 +0000 Subject: fix memory fault if non-existent filename is given to the -f option ok markus@ --- usr.bin/ssh/ssh-keyscan.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'usr.bin') diff --git a/usr.bin/ssh/ssh-keyscan.c b/usr.bin/ssh/ssh-keyscan.c index 35f872472a8..96471067661 100644 --- a/usr.bin/ssh/ssh-keyscan.c +++ b/usr.bin/ssh/ssh-keyscan.c @@ -7,7 +7,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: ssh-keyscan.c,v 1.27 2001/08/05 23:29:58 markus Exp $"); +RCSID("$OpenBSD: ssh-keyscan.c,v 1.28 2001/08/27 22:02:13 danh Exp $"); #include #include @@ -764,6 +764,8 @@ main(int argc, char **argv) for (j = 0; j < fopt_count; j++) { lb = Linebuf_alloc(argv[j], error); + if (!lb) + continue; while ((line = Linebuf_getline(lb)) != NULL) do_host(line); Linebuf_free(lb); -- cgit v1.2.3