summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorDan Harnett <danh@cvs.openbsd.org>2001-08-27 22:02:14 +0000
committerDan Harnett <danh@cvs.openbsd.org>2001-08-27 22:02:14 +0000
commit452439db16f5dffa751f705bd94beb070e986151 (patch)
treed66f2a82e6df472c7c0d707f175d4ffa859d053d /usr.bin
parent1f10b377bbf7d10bc5e1a1eae13db3a2229acf25 (diff)
fix memory fault if non-existent filename is given to the -f option
ok markus@
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/ssh/ssh-keyscan.c4
1 files changed, 3 insertions, 1 deletions
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 <sys/queue.h>
#include <errno.h>
@@ -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);