summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/ssh-keyscan.c
diff options
context:
space:
mode:
authormarkus <markus@openbsd.org>2001-11-16 12:46:13 +0000
committermarkus <markus@openbsd.org>2001-11-16 12:46:13 +0000
commit8635870199d8a42d30835be7f1736e910eeddabe (patch)
treea506b0585162278e3abb6e56b04aefd73ae2be0d /usr.bin/ssh/ssh-keyscan.c
parentyes, signed substraction does not work because of underflows, revert the previous (diff)
downloadwireguard-openbsd-8635870199d8a42d30835be7f1736e910eeddabe.tar.xz
wireguard-openbsd-8635870199d8a42d30835be7f1736e910eeddabe.zip
handle empty lines instead of dumping core; report from sha@sha-1.net
Diffstat (limited to 'usr.bin/ssh/ssh-keyscan.c')
-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 f3df3b6538e..4bb21001fcc 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.30 2001/10/08 19:05:05 markus Exp $");
+RCSID("$OpenBSD: ssh-keyscan.c,v 1.31 2001/11/16 12:46:13 markus Exp $");
#include <sys/queue.h>
#include <errno.h>
@@ -623,6 +623,8 @@ do_host(char *host)
char *name = strnnsep(&host, " \t\n");
int j;
+ if (name == NULL)
+ return;
for (j = KT_RSA1; j <= KT_RSA; j *= 2) {
if (get_keytypes & j) {
while (ncon >= MAXCON)