summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ssh-keygen.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ssh-keygen.c b/ssh-keygen.c
index 0833ee61d..a7c1e80b9 100644
--- a/ssh-keygen.c
+++ b/ssh-keygen.c
@@ -1082,7 +1082,7 @@ known_hosts_hash(struct hostkey_foreach_line *l, void *_ctx)
1082 struct known_hosts_ctx *ctx = (struct known_hosts_ctx *)_ctx; 1082 struct known_hosts_ctx *ctx = (struct known_hosts_ctx *)_ctx;
1083 char *hashed, *cp, *hosts, *ohosts; 1083 char *hashed, *cp, *hosts, *ohosts;
1084 int has_wild = l->hosts && strcspn(l->hosts, "*?!") != strlen(l->hosts); 1084 int has_wild = l->hosts && strcspn(l->hosts, "*?!") != strlen(l->hosts);
1085 int was_hashed = l->hosts[0] == HASH_DELIM; 1085 int was_hashed = l->hosts && l->hosts[0] == HASH_DELIM;
1086 1086
1087 switch (l->status) { 1087 switch (l->status) {
1088 case HKF_STATUS_OK: 1088 case HKF_STATUS_OK: